diff options
author | Keith Packard <keithp@keithp.com> | 2011-03-19 12:28:08 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-03-19 12:28:08 -0700 |
commit | 1aeb759c48f475ffaaae787515e080440c8386c3 (patch) | |
tree | 503c1c7772c34a816505c45eb1974f68147803d5 /src | |
parent | 7a4f6d5ad55637cde97a1e2f247f92df59bc2e14 (diff) |
altos: Baro-only boards must not detect launch on accel or speed data
The baro sensor generates too much noise to use small changes in
computed speed or acceleration to cause a false launch detect.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ao_flight.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/ao_flight.c b/src/ao_flight.c index e8130baa..71dd4891 100644 --- a/src/ao_flight.c +++ b/src/ao_flight.c @@ -488,10 +488,21 @@ ao_flight(void) * transition is detected */ #if USE_KALMAN +#if HAS_ACCEL + /* + * With an accelerometer, either to detect launch + */ if ((ao_k_accel > to_fix32(20) && ao_k_speed > to_fix32(5)) || ao_k_height > to_fix32(20)) #else + /* + * Without an accelerometer, the barometer is far too + * noisy to rely on speed or acceleration data + */ + if (ao_k_height > to_fix32(20)) +#endif +#else if ( #if HAS_ACCEL (ao_flight_accel < ao_ground_accel - ACCEL_BOOST && |