Compass variance nearly every initial power-up

Hi all,
I have a hexacopter running arducopter 3.5 on a pixhack FC, and a Here + RTK GPS/Mag. I am witnessing an odd problem. When I power the craft initially, I see on mission planner that the compass is not reporting properly. Sometimes it’s 10-15 degrees off, other times it’s 90 degrees off. If I pick up the craft and rotate it around the z Avis when this happens, the mission planner throws an EKF compass variance error pretty quickly.
The fix that I have been using that always works, is rebooting the pixhack with the ctrl + F “reboot pixhawk” button. (Not cycling battery power)… I then reboot mission planner and reconnect (not sure if the last step is necessary). After mission planner reconnects the compass is reporting correctly and I can move the craft in yaw and get no errors. Pretty frustrating because those compass variance errors have dire consequences sometimes! Any help is greatly appreciated.

Extra info.
Dual 16AH batteries in parallel.
One of the Compass offsets is 200 the other two are below 40.
Using compass 1 marked as external.

Thanks!
Caleb

Make sure both are installed away from power and things that can influence them, and recalibrate.
Or disable second (and third) compasses.

Thanks for the reply. So I only have the here + mag enabled. I can look into trying to further isolate the mag from possible magnetic interference, but if interference were the culprit, why would a simple reboot solve my problem every time?

Are you using the Pixhack v3 or the older 2.8.4?

I used to have the following problem last year:
https://discuss.ardupilot.org/t/onboard-compass-calibration-wont-complete-with-external-mag/18304

Also could you give some more information as to how your compass is mounted exactly? How close is it to the PDB or any of the power distribution wires?

Its probably this - https://github.com/ArduPilot/ardupilot/issues/6633

Do the resistor mod

It isn’t the pixhack v3, must be the 2.8.4 version…
I have the gps/mag mounted on a mast, a least 6 inches from the pdb.

Regarding the resistor mod rmacay stated that “Once the problem occurs, rebooting ardupilot (on the flight controller) does not resolve the problem, only powering down the flight controller resolves it.”

That isn’t what I’m witnessing.

The mod is pretty easy so I guess, I could do it anyway.

Thanks!