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..

asked Apr 25, 2016 at 4:48

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
answered Apr 25, 2016 at 5:05
1
  • yeah it may be...will try it..thanx Commented Apr 25, 2016 at 16:24

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.