diff options
author | Keith Packard <keithp@keithp.com> | 2017-08-27 16:57:13 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-08-27 17:40:40 -0700 |
commit | 12ef994a24eb996458092dc35c671d6b824b1576 (patch) | |
tree | 58066584a31ff89933f249cefe9c798e065bc346 /src/kernel | |
parent | f972000642f9c9835a0b7d14155d4c5695455d94 (diff) |
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 <keithp@keithp.com>
Diffstat (limited to 'src/kernel')
-rw-r--r-- | src/kernel/ao_kalman.c | 5 |
1 files changed, 0 insertions, 5 deletions
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; |