Constant Compass Errors and Incorrect Heading

[FIXED, see edit below]

Hi all,

I have had no compass problems with my rover until recently. For the past few weeks, the errors “ERROR COMPASS VARIANCE” and “BAD COMPASS HEALTH” have constantly been popping up. I am using an external 3DR compass with the internal compass on the Pixhawk. While the rover is operating, Mission Planner shows the rover following the way points fine, but its compass heading is pointing 45 to 120 degrees to the right of its real heading. Also, while the internal compass calibrates fine, the external compass’s progress bar always resets at 99%. It is a large ordeal to calibrate this compass due to the size of the rover as well.


  • update Pixhawk firmware
  • update Mission Planner
  • check for magnetic interference from the rover (motors are far away from both compasses, calibration done away from large metal objects)
  • check compass orientations on the rover (both have the arrow pointing towards the front with labels facing upwards)
  • turn one compass off, try to calibrate the other one by itself (external compass still fails)
  • switching out the 3DR compass for an identical replacement

At the moment I’m lost as to why these errors are occurring, even when switching out the compass. Any help is greatly appreciated!

I fixed this problem by taking the compass and Pixhawk off the rover and hooked them up using short wires. Calibration went fine so I hooked them up using the long wires I had used on the rover and the calibration would not completed. I ended up making a new set of cables, reinstalled the compass and pixhawk on the rover, and the calibration worked. The problem was somewhere in the old wires. I had tested them with a multimeter and they seemed to work but for some reason the compass would never calibrate when using these wires.

i sorted it out by adding my apm to the bin and uninstall mission planner. feeling much better now…

I would look to make sure your orientation didn’t get changed somehow. I always thought that the 3DR compass had to be set at ROLL 180, but it actually works with no offset. When I set it to ROLL 180, it acts how you describe. I also calibrate the two separately, but in your case I would try setting the board compass to “do not use” while you calibrate the external compass. After that, you can check the box to use the compass again.

Good luck!

You can check you wiring too. That isn’t not normal that you can’t finish the calibration. Maybe you got a bad connection on the wiring (on long cable I2C line can be disturbed)

Compass Variance means the internal compass and external compass don’t agree. It is most often that the external is not pointing forward or as mentioned the rotation is not set correctly. The APM settings did have rotate-roll 180 as “normnal” but Pixhawk the normal setting is “no rotation” and it will detect it automagically.

So make sure that the compass chip in the external module is pointing forward, don’t go by any arrows or other indications on the case. Then make sure there are no magnetic materials near that compass that could pull it off forward.

Last make sure you do the calibration outside away from rebar in concrete, buried tanks, etc etc,

I am having issues also, but always get solved restarting the rover.
My problem is that sometimes the yaw in mission Planner goes to 270° no matter where the rover is pointing at, but as I’ve said, reseting solves the problem. It does not happen during operating, it only happens when powering on.

Pixhawk 2 cube, ArduRover beta, here GPS and here+ GPS with rtk station.