From: Keith Packard Date: Sun, 27 Aug 2017 23:57:13 +0000 (-0700) Subject: altos: Eliminate separate height error filter for accelerometer devices X-Git-Tag: 1.8.1~14 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=12ef994a24eb996458092dc35c671d6b824b1576 altos: Eliminate separate height error filter for accelerometer devices We don't use the error value in flight for those models anyways; it's only useful on baro-only hardware. Signed-off-by: Keith Packard --- 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;