Guide to gyro and accelerometer with Arduino including Kalman filtering

Yes that it totally wrong. If you do like that, it will plus the angle with the last one. It should be:

Angle = kalmanCalculateX(accXangle, gyroXrate, dtime);

It is only when you calculate the gyros angle that you have to plus the last angle with the new one!

  • Lauszus