altos: De-bias height/speed data while on pad
authorKeith Packard <keithp@keithp.com>
Sun, 11 Oct 2020 05:00:56 +0000 (22:00 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 22 Oct 2020 04:33:59 +0000 (21:33 -0700)
commit4370b7e7bc48d3f3f3ec94665449f1fde4e9567c
tree6178e0152749c0a6934024f8b97858368dc0eaf9
parenta7d8a0f8b26bf62b63f12110d6d66a4f9da76eae
altos: De-bias height/speed data while on pad

Save speed/height values from 64 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