← All tools

Message & Error Explainer

What an ArduPilot message means and what to do about it

Українська

The EKF switched to another core (ERR EKF_PRIMARY)

WarningPosition and attitude estimate (EKF, AHRS)Copter only

What ArduPilot says:

The EKF runs one estimator (a “core”) for each IMU in use and flies on the one that agrees best with the sensors. This error records a change of that primary core; the code is the number of the new one (0 is the first IMU, 1 the second). The message “EKF primary changed:1” says the same. One switch in a flight is the system working as designed; switching back and forth means one IMU's core keeps disagreeing with the sensors.

What to do, most likely first

  1. One IMU suffers more vibration than the other, so its core drifts away.

    CheckCompare the VIBE messages of the two IMUs (VIBE.IMU 0 and 1) and their clipping counts.

    FixReduce the vibration: balance the props and check how the flight controller is mounted.

  2. The estimate was under stress (a GPS glitch, compass trouble) and the EKF changed cores to recover shortly before an EKF failsafe.

    Check“ERR EKFCHECK-2” or “GPS Glitch or Compass error” is in the log within a second or two.

    FixFollow the cause of that event: see “EKF variance” and “GPS Glitch or Compass error”.

  3. One IMU is failing or badly calibrated.

    CheckWith the copter at rest, IMU.AccZ of the two IMUs differs by more than a few tenths of a m/s².

    FixRepeat the accelerometer calibration; if one IMU still disagrees, the board needs attention.

Parameters to look at

ParameterWhat it is
EK3_IMU_MASKBitmask of active IMUs
EK3_PRIMARYPrimary core number
EK3_AFFINITYEKF3 Sensor Affinity Options

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