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
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
-
yeah it may be...will try it..thanxsir mordred– sir mordred2016年04月25日 16:24:30 +00:00Commented Apr 25, 2016 at 16:24