im working on the following project kalman filter

and im working to implement in arduino.. i read the entire code and i succesfully implemented it into arduino but i couldnt implement the following function code line because arduino gives "not defined" error in PI_DIV_180


it multiplies fgx with PI_DIV_180 but as i said arduino cant identify it

i looked into math.h to find the value of that define but there isnt anything in math.h related with this

the imu_MadgwickQuaternionUpdate function is in here IMU.cpp

can anyone help me please thanx..

1 Answer 1


Maybe it's pi (π) divided by 180?

Pi is roughly: 3.1415926535898


3.1415926535898 / 180 = 0.017453292519943

So add this line:

#define PI_DIV_180 0.017453292519943
  • yeah it may be...will try it..thanx Apr 25, 2016 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.