The compass calibration would not start
What ArduPilot says:
- Compass cal requires GPS lock
- CompassCalibrator: Cannot start compass thread.
- Compass cal object not initialised
- Disarm to allow compass calibration
ArduPilot refused to begin a compass calibration. “Disarm to allow compass calibration”: the aircraft is armed. “Compass cal requires GPS lock”: bit 0 of COMPASS_OPTIONS asks for a GPS fix first, so that the result can be checked against the field expected at your location. “Compass cal object not initialised” and “Cannot start compass thread” mean there was not enough free memory to run the calibration.
What to do, most likely first
The aircraft is armed.
FixDisarm, then start the calibration.
COMPASS_OPTIONSbit 0 is set and the GPS has no fix yet.FixTake the aircraft outdoors, wait for the fix and start the calibration again. The option is worth keeping: it makes sure the field strength gets checked.
The flight controller is short of memory (a small board with many features switched on).
CheckThe message is one of the two about the calibration object or thread.
FixReboot and calibrate before doing anything else. If it repeats, switch off a feature you do not use (scripting takes the most memory) and reboot.
Parameters to look at
| Parameter | What it is |
|---|---|
COMPASS_OPTIONS | Compass options |
Where to do it:Setup & Tuning Guide
The code that sends it
Compass cal requires GPS lock
libraries/AP_Compass/AP_Compass_Calibration.cpp Compass::_start_calibration() · Open in ArduPilot Copter-4.7.1
CompassCalibrator: Cannot start compass thread.
libraries/AP_Compass/AP_Compass_Calibration.cpp Compass::_start_calibration() · Open in ArduPilot Copter-4.7.1
Compass cal object not initialised
libraries/AP_Compass/AP_Compass_Calibration.cpp Compass::_start_calibration() · Open in ArduPilot Copter-4.7.1
Disarm to allow compass calibration
libraries/AP_Compass/AP_Compass_Calibration.cpp Compass::handle_mag_cal_command() · Open in ArduPilot Copter-4.7.1
libraries/RC_Channel/RC_Channel.cpp RC_Channel::do_aux_function() · Open in ArduPilot Copter-4.7.1