altos: Average height values for landing detection
authorKeith Packard <keithp@keithp.com>
Tue, 2 Aug 2011 05:33:38 +0000 (22:33 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 2 Aug 2011 07:30:08 +0000 (00:30 -0700)
commite19a117b99e8374ca0e8e35948e23bc672ad1a32
treec079f4bf51fbca4ff00dd5232698cd6ecd247436
parent146a0ab223e8d9b376125d1e59f597f6d7851a9b
altos: Average height values for landing detection

Instead of using the direct output of the kalman filter and hoping
that is quiet enough to detect landing, filter that with a long
exponential decay filter and then check to make sure that doesn't
change more than 2m in 5 seconds as a trigger for landing detection.

Tested with existing telemetrum flight logs and it correctly detects
landing in all cases.

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