← All tools

Message & Error Explainer

What an ArduPilot message means and what to do about it

Українська

The first compass needs too large a correction

Stops itCompass

What ArduPilot says:

A calibration stores offsets for each compass: the constant magnetic field of the aircraft itself, subtracted from every reading (COMPASS_OFS_X, COMPASS_OFS_Y, COMPASS_OFS_Z, in milligauss). For the first compass in use, the three taken together as one vector are longer than COMPASS_OFFS_MAX (1800 by default). ArduPilot expects about 530 for the Earth's field itself, so the aircraft's own magnetism is several times stronger than what the compass is meant to measure.

What to do, most likely first

  1. The first compass is the one on the flight controller, right next to the battery leads and the power board.

    CheckCOMPASS_EXTERNAL 0 means the first compass is on the board itself. The ground station's compass screen shows which compass is first and whether it is external.

    FixUse the compass in the GPS module, mounted away from the wiring: move it to the top of the list in the compass screen, set COMPASS_USE2 (or COMPASS_USE3) to 0 for the internal one, reboot and calibrate.

  2. Something magnetic sits close to the compass: steel screws, a buzzer, a magnet in a battery strap or a canopy latch.

    CheckWatch the raw compass values (mx, my, mz in the ground station's status) while you move the suspect part away: a jump of hundreds is the answer.

    FixMove the part or the compass, use brass, aluminium or nylon hardware near the compass, then calibrate again.

  3. The calibration was done near a lot of steel: indoors, over reinforced concrete, beside a car.

    FixCalibrate again outdoors in the open, with the battery and everything that flies with the aircraft fitted.

The calibration accepts each axis up to COMPASS_OFFS_MAX on its own, while arming measures the three together, so a calibration can succeed and arming still refuse. Raising COMPASS_OFFS_MAX does not move the iron away: the heading stays poor.

Parameters to look at

ParameterWhat it is
COMPASS_OFS_XCompass offsets in milligauss on the X axis
COMPASS_OFS_YCompass offsets in milligauss on the Y axis
COMPASS_OFS_ZCompass offsets in milligauss on the Z axis
COMPASS_OFFS_MAXCompass maximum offset
COMPASS_EXTERNALCompass is attached via an external cable
COMPASS_USEUse compass for yaw
COMPASS_USE2Compass2 used for yaw
COMPASS_USE3Compass3 used for yaw
The code that sends it

PreArm: Compass offsets too high

libraries/AP_Arming/AP_Arming.cpp AP_Arming::compass_checks() · 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