dealing with multiple rotations --> IMU & Kalman filter

I have currently implemented a kalman filter to fuse gyro and accelerometer data on one axis of rotation to obtain a good estimate of the angle with respect to ground.

I followed this guide --> http://tom.pycke.be/mav/71/kalman-filtering-of-imu-data
And I calculate the angle based soley on accelerometer data with this method (atan2) --> http://tom.pycke.be/mav/69/accelerometer-to-attitude

Now the filter works very well, as I've tested. However, it all falls apart when I rotate my device beyond the range of -pi and pi (-180 and 180 degrees), as atan2 will return values only within this range, and thus there are large discontinuities in my data when this happens (i.e. values quickly flipping from 180 degrees to -180 degrees and vice versa).

How do people normally solve this discontinuity problem?

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…