Having an IMU on board allows doing some nice automatic system administration. Mainly, we can detect whether we are moving (flying) or at rest (on the ground).
Requirements
Log accelerometer (x-axis) data.
Use a moving window to keep the last, say 10, values.
With some tolerance for noise, detect motion from rest.
Accept two callbacksis_in_flight and is_on_ground so other parts of the flight software can be notified when the two conditions are detected.
Description
Having an IMU on board allows doing some nice automatic system administration. Mainly, we can detect whether we are moving (flying) or at rest (on the ground).
Requirements
is_in_flight
andis_on_ground
so other parts of the flight software can be notified when the two conditions are detected.