← All tools

Message & Error Explainer

What an ArduPilot message means and what to do about it

Українська

A compass on the priority list did not show up at start-up

Stops itCompass

What ArduPilot says:

ArduPilot keeps a list of the compasses it expects, in order of preference: COMPASS_PRIO1_ID, COMPASS_PRIO2_ID, COMPASS_PRIO3_ID (each holds a device ID). The message gives the place in that list, 1 to 3, of a compass that is switched on for heading but was not detected when the flight controller started.

What to do, most likely first

  1. The GPS/compass module is unplugged, or its I2C wires (SDA, SCL) are broken or swapped.

    CheckMost GPS modules carry the compass on two extra wires. With them connected correctly the compass appears in the ground station's compass screen after a reboot.

    FixReconnect it (SDA to SDA, SCL to SCL, power and ground) and reboot. The Board & Wiring Planner shows where the I2C pads are on your board.

  2. A DroneCAN compass did not start: CAN is not enabled, or the node had no power.

    CheckA CAN compass needs CAN_P1_DRIVER 1 and CAN_D1_PROTOCOL 1, and its node must be listed in the ground station's DroneCAN screen.

    FixEnable CAN, check the cable and its power, and reboot.

  3. The compass was removed on purpose, but its ID is still on the list.

    CheckThe ID at the place the message gives (COMPASS_PRIO1_ID, COMPASS_PRIO2_ID or COMPASS_PRIO3_ID) belongs to hardware that is no longer there.

    FixSet that parameter to 0 and reboot. Starting a calibration of all compasses also drops missing ones from the list (“Mag: Compass #… removed”); reboot after it.

This message counts places from 1; “Mag: Compass #0 … removed” counts from 0. Both mean the first place on the list.

Parameters to look at

ParameterWhat it is
COMPASS_PRIO1_IDCompass device id with 1st order priority
COMPASS_PRIO2_IDCompass device id with 2nd order priority
COMPASS_PRIO3_IDCompass device id with 3rd order priority
COMPASS_USEUse compass for yaw
COMPASS_USE2Compass2 used for yaw
COMPASS_USE3Compass3 used for yaw
CAN_P1_DRIVERIndex of virtual driver to be used with physical CAN interface
CAN_D1_PROTOCOLEnable use of specific protocol over virtual driver
The code that sends it

Compass N not found

libraries/AP_Compass/AP_Compass.cpp Compass::configured() · 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