The compasses disagree with each other
What ArduPilot says:
- PreArm: Compasses inconsistent
Every compass switched on for heading is compared with the first one. They count as inconsistent when their field directions differ by more than 90 degrees in space, or by more than 60 degrees seen from above, or when the horizontal parts differ by more than 200 milligauss. A compass whose horizontal reading is exactly zero fails too. With only one compass in use the check cannot fail.
What to do, most likely first
The compass on the flight controller is disturbed by the electronics around it, while the external one is clean.
CheckThe ground station's compass screen shows which compasses are in use. An internal one close to power wiring rarely agrees with a compass on a mast.
FixKeep the external compass first in the list and switch the internal one off for heading:
COMPASS_USE20 (orCOMPASS_USE30, whichever place it has), then reboot.The external compass's orientation is set wrong, so the two point different ways.
CheckA module mounted turned, sideways or upside down needs the matching
COMPASS_ORIENT(for a second external compass,COMPASS_ORIENT2).FixRun the calibration with
COMPASS_AUTO_ROT2: it works out and saves the orientation of external compasses. Calibrate all compasses in the same run.The compasses were calibrated at different times or places, or something magnetic was added since.
FixCalibrate all of them together again, outdoors, with the aircraft as it flies.
Right now a steel object or a magnet is closer to one compass than to the other.
CheckThe message goes away when you move the aircraft off the bench, away from the car or the tool lying next to it.
FixArm away from metal.
The first compass is the reference: if it is the bad one, every other compass looks inconsistent.
Parameters to look at
| Parameter | What it is |
|---|---|
COMPASS_USE | Use compass for yaw |
COMPASS_USE2 | Compass2 used for yaw |
COMPASS_USE3 | Compass3 used for yaw |
COMPASS_ORIENT | Compass orientation |
COMPASS_ORIENT2 | Compass2 orientation |
COMPASS_EXTERNAL | Compass is attached via an external cable |
COMPASS_EXTERN2 | Compass2 is attached via an external cable |
COMPASS_AUTO_ROT | Automatically check orientation |
Where to do it:Setup & Tuning Guide
The code that sends it
PreArm: Compasses inconsistent
libraries/AP_Arming/AP_Arming.cpp AP_Arming::compass_checks() · Open in ArduPilot Copter-4.7.1