3DR uBLOX Compass doesn't seem to be working with Pixhawk

I’ve flown my pixhawk about a dozen times so far with no issues. This evening I installed the new mission planner software and 3.1.2 firmware. After installing the firmware, I realized I had to calibrate everything again. Everything calibrated fine and I even did a quick test flight in my living room which worked.

After all the basic calibrations, I performed a compassmot using telemetry. When Compass mot completed It said I had 0% interference (which was surprising although I have my GPS on a short stand). Last time I had 5% interference.

After that, I disconnected from CLI and reconnected to mission planner. I noticed that my heading and horizon is continually drifting and won’t stay level anymore. I tried running Live Calibration again but it said 0 samples were collected and I wasn’t able to complete it. I’ve tried running live calibration several times unsuccessfully (both with telemetry and connected via USB).

Next I tried reinstalling the old Firmware. Same issue. Won’t calibrate compass anymore.

Here is what the Client shows under Setup / Compass:
Op: [on,off]

Mag Dec: 11.9075
Mag off: -132.9440, 45.6021, 61.6105
Motor Comp: Current
Comp Vec: nan, -1.50, -0.58

Is there an easy way to see if my external compass is working? I’m wondering if I accidentally broke my compass cable perhaps? Is it possible that running compassmot would have messed something up?

If you need more information/clarifications/pictures let me know.


Here is what the Compass Test looks like in CLI. I moved the compass around in all directions. I noticed during the test that heading didn’t change. Also one* of the parameters says “nan” - I’m not sure what that means.

Exactly the same happened to me today after Compassmot Cal.

I figured it out. Looks like there is a bug with Compass mot and Pixhawk with 3.1.2 software. After performing compassmot test with the new software, one of my Compassmott parameters had “nan” marked in it where it should have been a number.

In order to fix it, I went into the full list of parameters, the compass mot parameters, and changed them all to zeros (no offsets). After that it worked great!

Hope this helps others.

Great stuff, thanks for posting this.

Life saver! Same here and it saved me lots of pain!

Thanks for posting.