← All tools

Message & Error Explainer

What an ArduPilot message means and what to do about it

Українська

The EKF's sensors disagree: the position estimate is no longer trusted

Act nowPosition and attitude estimate (EKF, AHRS)

What ArduPilot says:

Ten times a second the copter compares the EKF's innovation ratios with FS_EKF_THRESH (0.8 by default). An innovation is the difference between what a sensor says and what the EKF, ArduPilot's position and attitude estimator, expected; at a ratio of 1.0 the reading is rejected. The estimate is declared bad after 1 s in which two of compass, velocity and position are over the threshold, or velocity alone is over twice the threshold, or the position is lost. Just before that it asks the EKF to reset its heading and to change lane. This line is sent (once per 30 s at most) and the EKF failsafe acts.

What to do, most likely first

  1. The compass is wrong for the heading flown: motor current disturbs it at high throttle, or its calibration or orientation is off.

    CheckIn the log the compass ratio (XKF4.SM) rises with throttle, and before the message the aircraft circled wider and wider instead of holding its spot.

    FixLand. Move the compass away from the power wires (a GPS mast), calibrate it again, and run the compass-motor calibration if it has to stay near the wiring.

  2. The GPS glitched: its position or velocity jumped, from reflections, interference or jamming.

    CheckIn the log XKF4.SV and XKF4.SP jump while the compass ratio stays low, and the satellite count or HDOP changes at the same moment.

    FixTake over in a mode that needs no position and land. Fly in the open and keep transmitters and cameras away from the GPS antenna.

  3. Strong vibration corrupts the accelerometers, so the EKF's velocity drifts away from the GPS's.

    CheckThe vibration and clipping values in the log (VIBE) are high or rise before the message; “Vibration compensation ON” may appear too.

    FixBalance or replace the props, mount the flight controller on dampers and tie down loose wires before the next flight.

  4. On the ground and disarmed: the GPS was lost after the EKF had a position, typically when the aircraft is carried indoors.

    FixNothing to repair: disarmed, the failsafe takes no action and clears when the position returns. Do not take off in a position mode until it has.

In the log this is error subsystem 16 (EKFCHECK): code 2 when the estimate went bad, 0 when it cleared. What the copter does next is set by FS_EKF_ACTION; see the EKF failsafe.

Parameters to look at

ParameterWhat it is
FS_EKF_THRESHEKF failsafe variance threshold
FS_EKF_ACTIONEKF Failsafe Action
EK3_GSF_USE_MASKBitmask of which EKF-GSF yaw estimators are used
COMPASS_USEUse compass for yaw
The code that sends it

EKF variance

ArduCopter/ekf_check.cpp Copter::ekf_check() · Open in ArduPilot Copter-4.7.1

ArduPlane/ekf_check.cpp Plane::ekf_check() · Open in ArduPilot Plane-4.7.1

Written here for Copter 4.6. In the tool you choose your vehicle and version, see your own parameter values beside the ones named here, and drop a flight log to have every message in it explained.

Open it in the Message & Error Explainer