Make sure the barometer is reporting some sensible value before
letting TM try to fly the rocket.
Signed-off-by: Keith Packard <keithp@keithp.com>
if (ao_config.accel_plus_g == 0 ||
ao_config.accel_minus_g == 0 ||
ao_ground_accel < ao_config.accel_plus_g - ACCEL_NOSE_UP ||
- ao_ground_accel > ao_config.accel_minus_g + ACCEL_NOSE_UP)
+ ao_ground_accel > ao_config.accel_minus_g + ACCEL_NOSE_UP ||
+ ao_ground_height < -1000 ||
+ ao_ground_height > 7000)
{
/* Detected an accel value outside -1.5g to 1.5g
* (or uncalibrated values), so we go into invalid mode