0

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

imu_MadgwickQuaternionUpdate(bUseAccel,elapsedTimeSecs,fax,fay,faz,fgx*PI_DIV_180,fgy*PI_DIV_180,fgz*PI_DIV_180,fmx,fmy,fmz);

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

1

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

Pi is roughly: 3.1415926535898

So:

3.1415926535898 / 180 = 0.017453292519943

So add this line:

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

Your Answer

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

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