EKF failsafe: the position estimate is no longer trusted
What ArduPilot says:
- EKF Failsafe
- EKF Failsafe Cleared
- EKF Failsafe: changed to … Mode
- ERR FAILSAFE_EKFINAV (Subsys 17)
Code 1: after “EKF variance” the copter acts on FS_EKF_ACTION. In a mode that needs no position (Stabilize, AltHold, Acro) nothing changes unless the value is 3. Otherwise: 1 (the default) Land, 2 AltHold, 3 Land even from Stabilize. This Land has no position hold: after a 4 s pause the copter descends and drifts with the wind while you steer with roll and pitch. With 2 it still lands if the radio is in failsafe too. Code 0: the estimate is good again; the mode stays as it is until you change it.
What to do, most likely first
The estimate failed for the reasons given under “EKF variance” (ERR EKFCHECK-2): the GPS, the compass, or vibration.
CheckLook at XKF4.SV, SP and SM in the seconds before the error: the one that reaches 1 first points to velocity or position (GPS) or to the compass.
FixFind which of the three it was in the log and fix it before flying a position mode again.
The position source disappeared altogether (no GPS fix, optical flow lost the ground).
CheckGPS.Status in the log drops below 3 before the error.
FixPractise flying home in AltHold, so that losing the position is an inconvenience and not an emergency.
Parameters to look at
| Parameter | What it is |
|---|---|
FS_EKF_ACTION | EKF Failsafe Action |
FS_EKF_THRESH | EKF failsafe variance threshold |
FS_EKF_FILT | EKF Failsafe filter cutoff |
Where to do it:Failsafe ExplainerSetup & Tuning GuideSetup & Tuning Guide
The code that sends it
EKF Failsafe
ArduCopter/ekf_check.cpp Copter::failsafe_ekf_event() · Open in ArduPilot Copter-4.7.1
EKF Failsafe Cleared
ArduCopter/ekf_check.cpp Copter::failsafe_ekf_off_event() · Open in ArduPilot Copter-4.7.1
EKF Failsafe: changed to … Mode
ArduCopter/ekf_check.cpp Copter::failsafe_ekf_event() · Open in ArduPilot Copter-4.7.1