A compass that is in use has no calibration
What ArduPilot says:
- Compass not calibrated
For every compass switched on for heading (COMPASS_USE, COMPASS_USE2, COMPASS_USE3), ArduPilot looks for a saved calibration: offsets that are not all zero, and a saved device ID equal to the compass it found at start-up. One of the compasses fails that test. A new board, a firmware change that erased the parameters, or a different compass in the same place all end here.
What to do, most likely first
The compass has never been calibrated on this aircraft, or the parameters were reset.
Check
COMPASS_OFS_X,COMPASS_OFS_YandCOMPASS_OFS_Zare all 0.FixCalibrate the compass outdoors, away from cars and steel, turning the aircraft through every orientation until the bar is full. Then reboot the flight controller: after a calibration arming stays refused until it restarts.
The compass was replaced, or moved to another port: its device ID is no longer the one the calibration was saved for.
CheckA calibration belongs to one sensor on one bus. A new GPS/compass module, or the same one on another I2C or CAN port, has another ID than the saved
COMPASS_DEV_ID.FixCalibrate again with the new compass connected, then reboot.
A second or third compass you do not mean to use is switched on and uncalibrated.
CheckThe ground station's compass screen lists every compass found; the one on the flight controller itself counts too.
FixCalibrate all of them in one run, or set
COMPASS_USE2orCOMPASS_USE3to 0 for the one you do not want and reboot.
Flying without a compass is a setup of its own, described by parameters: COMPASS_ENABLE 0 (or COMPASS_USE, COMPASS_USE2 and COMPASS_USE3 all 0) together with EK3_SRC1_YAW 8 (GSF), which works the heading out from GPS movement. It needs a good GPS, and the heading is unknown until the copter has moved.
Parameters to look at
| Parameter | What it is |
|---|---|
COMPASS_OFS_X | Compass offsets in milligauss on the X axis |
COMPASS_OFS_Y | Compass offsets in milligauss on the Y axis |
COMPASS_OFS_Z | Compass offsets in milligauss on the Z axis |
COMPASS_DEV_ID | Compass device id |
COMPASS_USE | Use compass for yaw |
COMPASS_USE2 | Compass2 used for yaw |
COMPASS_USE3 | Compass3 used for yaw |
COMPASS_ENABLE | Enable Compass |
Where to do it:Setup & Tuning Guide
The code that sends it
Compass not calibrated
libraries/AP_Compass/AP_Compass.cpp Compass::configured() · Open in ArduPilot Copter-4.7.1