Complementary filter bug

This commit is contained in:
Stedd 2019-12-23 02:52:37 +01:00
parent 4129c92d15
commit 54d2701460
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ void readIMU() {
//Complementary filter
dAngle = pitch_rate * dT_s;
pitch = acc_pitch * (1 - alpha) + (dAngle + pitch_prev * alpha);
pitch = acc_pitch * (1 - alpha) + ((dAngle + pitch_prev) * alpha);
pitch_prev = pitch;