altos: Adjust flight algorithm to handle accel-only timer products
authorKeith Packard <keithp@keithp.com>
Thu, 7 May 2020 05:34:51 +0000 (22:34 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 7 May 2020 05:34:51 +0000 (22:34 -0700)
commit527994d05e8caf9d3bc31461a8d4a05a596b4603
treef7516cb80ab05be5760f0a10e1a5478645c3e283
parent329dbb1ff04d16f4ee93037eaea6503d80d234f6
altos: Adjust flight algorithm to handle accel-only timer products

Make our accel-only product (easytimer) follow a shortend flight
state sequence:

 1) startup Average samples
 2.1) startup -> idle. Defined axis accel indicates not pointing up
 2.2) startup -> pad. Defined axes accel indicates pointing up
 3) pad -> boost. Accel > 20m/s² and speed > 5m/s
 4) boost -> coast. accel < -2.5m/s² or 15 second boost
 5.1) coast -> boost. average accel  > 20m/s²
 5.2) coast -> landed. All three accel axes stable for 10 seconds (< 2m/s² accel change)

Signed-off-by: Keith Packard <keithp@keithp.com>
src/drivers/ao_bmx160.h
src/easytimer-v1/ao_pins.h
src/kernel/ao_data.h
src/kernel/ao_flight.c