Complementary filter bug
This commit is contained in:
parent
4129c92d15
commit
54d2701460
|
@ -55,7 +55,7 @@ void readIMU() {
|
||||||
|
|
||||||
//Complementary filter
|
//Complementary filter
|
||||||
dAngle = pitch_rate * dT_s;
|
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;
|
pitch_prev = pitch;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue