← All tools

Message & Error Explainer

What an ArduPilot message means and what to do about it

Українська

The EKF threw the compass heading away and took one worked out from GPS

Act nowPosition and attitude estimate (EKF, AHRS)

What ArduPilot says:

The heading held by the EKF, ArduPilot's position and attitude estimator, was so wrong that its velocity stopped following the GPS. Just before declaring an EKF failsafe the aircraft asks for this rescue: the EKF replaces its heading with one worked out from GPS velocity and the IMU alone (the GSF yaw estimator), resets velocity and position to the GPS, and stops using the compass for the rest of the flight. EK3_GSF_RST_MAX (2 by default) limits how many times per flight. IMU numbers the EKF copy, from 0.

What to do, most likely first

  1. Motor current disturbs the compass at high throttle, so the heading swings in flight.

    CheckIn the log the compass readings follow the battery current; the reset came during a climb or a fast run.

    FixLand and do not fly again until it is fixed: move the compass away from the power wiring and run the compass-motor calibration.

  2. The aircraft took off with a wrong heading: steel at the take-off spot, or a compass with a wrong orientation or calibration.

    CheckThe reset came within the first seconds of flight; before take-off the heading in the ground station did not match the real one.

    FixCheck the compass orientation and calibrate it again; take off away from metal, and compare the heading on the map with the real one before every flight.

  3. The GPS, not the compass, was wrong: a glitch or spoofing made the GPS velocity point the wrong way.

    CheckThe satellite count or HDOP changed at that moment, and the position on the map jumped.

    FixTake over in a mode that needs no position and land. The compass stays unused after the reset: reboot before the next flight.

Parameters to look at

ParameterWhat it is
EK3_GSF_USE_MASKBitmask of which EKF-GSF yaw estimators are used
EK3_GSF_RUN_MASKBitmask of which EKF-GSF yaw estimators run
EK3_GSF_RST_MAXMaximum number of resets to the EKF-GSF yaw estimate allowed
COMPASS_USEUse compass for yaw
The code that sends it

EKF2 IMUN emergency yaw reset

libraries/AP_NavEKF2/AP_NavEKF2_MagFusion.cpp NavEKF2_core::EKFGSF_resetMainFilterYaw() · Open in ArduPilot Copter-4.7.1

EKF3 IMUN emergency yaw reset

libraries/AP_NavEKF3/AP_NavEKF3_MagFusion.cpp NavEKF3_core::EKFGSF_resetMainFilterYaw() · Open in ArduPilot Copter-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