Calculating Yaw with Kalman Filter

All questions related to the configuration tool and groundstation

Moderator: lukasz

Calculating Yaw with Kalman Filter

Postby Ahmed » Wed Dec 14, 2011 3:27 pm

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..
Attachments
Heading and Yaw Kalman.png
Heading and Yaw Kalman.png (9.3 KiB) Viewed 16350 times
Ahmed
 
Posts: 1
Joined: Wed Dec 14, 2011 3:10 pm

Re: Calculating Yaw with Kalman Filter

Postby Tom » Wed Dec 14, 2011 7:42 pm

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°
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: Calculating Yaw with Kalman Filter

Postby Andersan » Tue Nov 18, 2014 11:51 am

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

Re: Calculating Yaw with Kalman Filter

Postby Tom » Tue Nov 18, 2014 5:49 pm

Sorry am I supposed to see a screenshot or so?
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium


Return to Software

Who is online

Users browsing this forum: No registered users and 1 guest

cron