← All tools

Message & Error Explainer

What an ArduPilot message means and what to do about it

Українська

The EKF gave up on one compass and moved to the next

WarningPosition and attitude estimate (EKF, AHRS)

What ArduPilot says:

A copy of the EKF, ArduPilot's position and attitude estimator, stopped trusting the compass it was using and moved to the next one that is healthy and allowed for heading; the last number is the new compass, from 0. It does this in flight when the compass readings have been rejected for 10 s (and not in the first 30 s after the EKF started), or at any time when the compass has sent nothing for 10 s.

What to do, most likely first

  1. The first compass is disturbed in flight by motor current; the other sits further from the wiring.

    CheckIn the log the first compass's readings follow the battery current, and the switch comes at high throttle.

    FixPut the best-placed compass first in the compass order (usually the one in the GPS mast), and run the compass-motor calibration.

  2. The compass stopped sending data: a loose cable or a failing sensor.

    CheckA compass health message appears at the same time, and it also happens on the ground.

    FixCheck the cable and connector of the external compass; replace the module if it keeps dropping out.

  3. The two compasses point different ways because one has a wrong orientation or an old calibration.

    FixCalibrate the compasses again and check the orientation of each.

Parameters to look at

ParameterWhat it is
COMPASS_USEUse compass for yaw
EK3_AFFINITYEKF3 Sensor Affinity Options
EK3_MAG_I_GATEMagnetometer measurement gate size
The code that sends it

EKF2 IMUN switching to compass N

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

EKF3 IMUN switching to compass N

libraries/AP_NavEKF3/AP_NavEKF3_Measurements.cpp NavEKF3_core::tryChangeCompass() · 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