Navio2 Compass Calibration Yaw Keeps Drifting

I have been playing around with the Navio2 on a RPI3. I am just testing the sensors to see how good they are and I plan on putting everything on an RC car.

I was able to test GPS and plotted the data and everything looked fine.

When I went to run the AHRS, the yaw continued to drift (assumed to be compass problem). I went through all of the posts in the forum and tried calibrating several different ways but nothing made the drift of the yaw go away. To be clear, by drift I mean when I set the module down and keep it still, the yaw keeps increasing (or decreasing).

I want to make sure I have been doing this properly. I have both a mac and a PC and have tried on both. Since this seems to be most common, this is what I did on the PC:

Remote

  • ssh into pi@navio
  • run APM: sudo ArduCopter-quad -A udp:192.168.1.2:14550

The raspberry pi is not mounted to anything and ArduRover does not work for me.

Local

  • Open mission planner and connect.
  • Go into compass calibration.
  • Select primary as compass 2
  • Enable automatic declination
  • Only check use this compass under compass #1 and #2
  • Click start in onboard mag cal and move it around until 100%
  • Verify that values changed

I believe the procedure is correct, but I am not seeing any improvement with yaw. How can I fix/troubleshoot this? Any help would be highly appreciated.

So you are calibrating compass with ArduPilot, but running the AHRS example? That does only calibrate compass for ArduPilot, not for the example.

Oh. I was calibrating the compass for ArduPilot and running the AHRS example.

However, when I calibrate with ArduPilot and look at the yaw in mission planner, the yaw is still diverging. Does the yaw in mission planner not calibrate either?