This is a Kalman filter used to calculate the angle, rate and bias from from the input of an accelerometer/magnetometer and a gyroscope.
Latest commit 6078dae Feb 3, 2017 @Lauszus Lauszus committed on GitHub Merge pull request #8 from gabrielSa/toSend
Explicit cast to int16_t, so it works on 32-bits microcontrollers

Developed by Kristian Lauszus, TKJ Electronics 2012

The code is released under the GNU General Public License.

This is a Kalman filter library for any microcontroller that supports float math.

It can also be used with Arduino, simply copy the folder to your library folder.

My assignment I wrote back in High School regarding Kalman filter can be found here:

For more information see my blog post: or send me an email at