ArduCopter 3.2 adds an EKF (Extended Kalman Filter – Pixhawk only) and Inertial Nav (Pixhawk and APM2) check to catch flyaways caused by bad position estimates.
When will it trigger?
Once the vehicle is armed with GPS lock, the EKF / InertialNav check runs 10 times per second and checks the health of the EKF (if using Pixhawk with AHRS_EKF_USE = 1) or the InertialNav system (APM2 or Pixhawk with AHRS_EKF_USE = 0).
- the EKF’s health is checked using it’s compass and velocity “variance”. This “variance” increases as the estimates become untrustworthy. 0 = very trustworthy, >1.0 = very untrustworthy. If both variances climb above the EKF_CHECK_THRESH parameter (default is 0.6) the EKF/Inav failsafe triggers.
- the Inertial Nav’s (i.e. 3rd order complementary filter) health is checked using it’s horizontal acceleration corrections. These corrections grow large (above 1m/s/s) when the filter is having trouble reconciling the GPS and accelerometer data so when they grow above the EKF_CHECK_THRESH the failsafe is triggered.
related commits: