Page 1 of 1

Calculating Yaw with Kalman Filter

PostPosted: Wed Dec 14, 2011 3:27 pm
by Ahmed
Hi;
I read and implemented the kalman filter tutorials written by Mr. Pycke.
I'm using kalman filter to calculate roll and pitch.
Now I want to use it to calculate Yaw Angle. I have heading angle from magnetometer and Z gyro rates.
I want to combine this angles to improve my Yaw angle.
I tried kalman filter and the result is on the attachment. Because the heading angle is limited from 0 to 360 degrees, the kalman creates a problem on the edges.
Is there any creative solutions for this:)

Thanks in advance..

Re: Calculating Yaw with Kalman Filter

PostPosted: Wed Dec 14, 2011 7:42 pm
by Tom
There are 3 main solutions:
* Use quaternions
* Use DCM (discrete cosine matrix)
* Use a lot of IF's in your code :-)

Keep in mind the conventions:
Roll : -180°..+180°
Pitch: -90°..+90°
Yaw: 0°..360°

Re: Calculating Yaw with Kalman Filter

PostPosted: Tue Nov 18, 2014 11:51 am
by Andersan
Thanks for Tom share the code of Gluonconfig. I would like to show Attitude in Textbox . The method like this is correct ? :

Re: Calculating Yaw with Kalman Filter

PostPosted: Tue Nov 18, 2014 5:49 pm
by Tom
Sorry am I supposed to see a screenshot or so?