Compass Inconsistent Error - Fixed-Wing Only Arms When GPS is Physically Rotated 180° (Pitch)

Hello everyone,

I’m setting up a new fixed-wing UAV and have encountered a compass calibration issue that I can’t seem to solve. I would appreciate any insights you might have.

Hardware & Software:

  • Flight Controller: Pixhawk 2.4.8

  • GPS/Compass: M8N GPS/Compass Module

  • Firmware: 1.15.4

  • Ground Control Station: QGroundControl (QGC)

  • Airframe: Fixed-wing

    I have performed all the necessary calibrations (ESC, motor, etc.). The Pixhawk 2.4.8 is mounted with its forward arrow pointing to the nose of the aircraft. The external M8N GPS/Compass module is also mounted on top of the fuselage with its arrow pointing forward, aligned with the Pixhawk.

When I perform the compass calibration and place the aircraft stationary on level ground, I consistently receive the error: “Compass inconsistent by (some) degrees”. In this state, the vehicle will not arm.

Interestingly, if I hold the aircraft at a specific awkward angle, the error disappears, and I am able to arm the vehicle. It even switches to Mission mode. However, the location shown on the QGC map is incorrect.

Here is the most confusing part: If I physically unmount the GPS module and rotate it 180 degrees on the pitch axis (so the arrow on the GPS case is now pointing towards the tail of the aircraft),-as in the image below- all the problems are resolved. With the GPS facing backward, the compass becomes consistent, the error disappears, and the aircraft arms perfectly while sitting level on the ground.

I am stuck because the physical orientation of the components seems correct (both arrows pointing forward). I am hesitant to simply set a 180-degree pitch rotation in the parameters (like SENS_MAG_ROT), as this feels like a workaround, not a solution to the root cause. My primary theories are:

  1. The magnetometer chip inside the M8N GPS puck is factory-mounted 180 degrees opposite to the arrow printed on the case.

  2. There is a different parameter I am overlooking that is causing this orientation conflict.

Has anyone experienced this behavior before? Is it common for these M8N modules to have misaligned internal sensors, or am I missing a crucial step in the setup process?

Thank you in advance for your help!

See ist8310: unify startup by alexcekay · Pull Request #25145 · PX4/PX4-Autopilot · GitHub - the mag orientation is not aligned with the compass arrow often.

2 Likes