The compass in use has stopped sending data
What ArduPilot says:
- PreArm: Compass not healthy
- PreArm: Compass N not healthy
The compass ArduPilot takes its heading from (the first enabled one in its priority list) has given no reading for more than half a second. The test runs with the other pre-arm checks while a compass is in use, and Copter repeats it at the moment of arming, where it cannot be switched off unless the heading comes from something other than a compass. 4.7 adds the compass's place in the list: “Compass 1 not healthy”.
What to do, most likely first
The compass is not connected: the GPS module's cable is unplugged, or its two data wires (SDA and SCL) are swapped.
CheckThe ground station's compass page lists the compasses found. On USB power alone many boards do not feed the GPS module: connect the battery (props off) before judging.
FixCorrect the wiring and reboot: compasses are searched for at start-up only.
The compass that was set up is gone: the module was replaced, and the first place in the list (
COMPASS_PRIO1_ID) still names the old one.FixOn the ground station's compass page put the compass you have at the top of the list, reboot, and calibrate it.
The aircraft has no compass at all.
FixTell ArduPilot so:
COMPASS_ENABLE0, and a heading source that needs none,EK3_SRC1_YAW8 (GSF, heading worked out from GPS speed once the aircraft moves). Reboot. Until it has moved a little, the heading is unknown and the position modes are not available.The compass chip or its module has failed.
CheckThe wiring is right and it still comes and goes, or stays missing.
FixReplace the module.
Parameters to look at
| Parameter | What it is |
|---|---|
COMPASS_ENABLE | Enable Compass |
COMPASS_USE | Use compass for yaw |
COMPASS_PRIO1_ID | Compass device id with 1st order priority |
COMPASS_DEV_ID | Compass device id |
COMPASS_EXTERNAL | Compass is attached via an external cable |
EK3_SRC1_YAW | Yaw Source |
Where to do it:Setup & Tuning GuideBoard & Wiring Planner
The code that sends it
PreArm: Compass not healthy
ArduCopter/AP_Arming.cpp AP_Arming_Copter::arm_checks() · Open in ArduPilot Copter-4.6.3
libraries/AP_Arming/AP_Arming.cpp AP_Arming::compass_checks() · Open in ArduPilot Copter-4.6.3
PreArm: Compass N not healthy
ArduCopter/AP_Arming_Copter.cpp AP_Arming_Copter::arm_checks() · Open in ArduPilot Copter-4.7.1
libraries/AP_Arming/AP_Arming.cpp AP_Arming::compass_checks() · Open in ArduPilot Copter-4.7.1