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

user10794: 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


20208: <p>im working on the following project <a href="https://github.com/har-in-air/Kalmanfilter_altimeter_vario" rel="nofollow">kalman filter</a></p>

<p>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 <a href="https://github.com/har-in-air/Kalmanfilter_altimeter_vario/blob/master/Usage.txt#L28" rel="nofollow">code line</a> because arduino gives "not defined" error in <strong>PI_DIV_180</strong></p>

<pre><code>imu_MadgwickQuaternionUpdate(bUseAccel,elapsedTimeSecs,fax,fay,faz,fgx*PI_DIV_180,fgy*PI_DIV_180,fgz*PI_DIV_180,fmx,fmy,fmz);
</code></pre>

<p>it multiplies <code>fgx</code> with <strong>PI_DIV_180</strong> but as i said arduino cant identify it</p>

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

<p>the <code>imu_MadgwickQuaternionUpdate</code> function is in here <strong>IMU.cpp</strong></p>

<p>can anyone help me please thanx..</p>
 10794: <p>Maybe it's pi (π) divided by 180?</p>

<p>Pi is roughly: 3.1415926535898</p>

<p>So:</p>

<pre><code>3.1415926535898 / 180 = 0.017453292519943
</code></pre>

<p>So add this line:</p>

<pre><code>#define PI_DIV_180 0.017453292519943
</code></pre>
