X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fkernel%2Fao_kalman.c;fp=src%2Fkernel%2Fao_kalman.c;h=87f1bf66f6147e372edad8a94513802aa11c1774;hb=12ef994a24eb996458092dc35c671d6b824b1576;hp=d401a3c8ff5bd04a88c7dea0216d53abcd145589;hpb=f972000642f9c9835a0b7d14155d4c5695455d94;p=fw%2Faltos diff --git a/src/kernel/ao_kalman.c b/src/kernel/ao_kalman.c index d401a3c8..87f1bf66 100644 --- a/src/kernel/ao_kalman.c +++ b/src/kernel/ao_kalman.c @@ -96,13 +96,8 @@ ao_kalman_err_height(void) e = -e; if (e > 127) e = 127; -#if HAS_ACCEL - ao_error_h_sq_avg -= ao_error_h_sq_avg >> 2; - ao_error_h_sq_avg += (e * e) >> 2; -#else ao_error_h_sq_avg -= ao_error_h_sq_avg >> 4; ao_error_h_sq_avg += (e * e) >> 4; -#endif if (ao_flight_state >= ao_flight_drogue) return;