altos: De-bias height/speed data while on pad
authorKeith Packard <keithp@keithp.com>
Sun, 11 Oct 2020 19:31:17 +0000 (12:31 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 11 Oct 2020 19:31:17 +0000 (12:31 -0700)
commitd55d7c56b81dba7043857a763d0749e93cf7823a
treeb01992a5ca83f77f09c411d7dd7e877fb20ef301
parentc0d047f7dcc69f9108ce0951713ba975c16101d4
altos: De-bias height/speed data while on pad

Save speed/height values from 128 samples ago and subtract them from
the current value. This reduces the effect of systematic accelerometer
error causing these values to slowly creep when there's no barometric
sensor to keep them in check.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/kernel/ao_flight.c
src/kernel/ao_kalman.c
src/kernel/ao_sample.c
src/kernel/ao_sample.h