If the heading is appearing north but the vehicle is not actually pointing north then this means that the compass is not working at all.
I’ve had a look at the logs especially at the COMPASS_DEV_IDx parameters which show which compasses have been detected. Mission Planner displays these in a somewhat user friendly manner on the Initial Setup / Mandatory Hardware/ HW ID page so you can also check these yourself in real-time.
In the Compass1/Test1 log, compass1 is an HMC compass. It’s missing from Test2 though which I think means there is a hardware issue, perhaps the cable or connector is bad or something else.
COMPASS_DEV_ID,466441 <- HMC compass
In the Compass2 logs only the internal compasses appear so again I think there’s a hardware issue:
In the Compass3 logs we reliably see an AK09916 so this one appears to be working OK.
COMPASS_DEV_ID,592905 <-- AK09916 compass
So I think there’s a hardware problem with Compass1 and 2. I’m not aware of anything that we would have changed in the software to make these less reliable but you could try going back to Copter-3.6.11 and see if there’s any difference in which COMPASS_DEV_IDx values appear. When testing it might be good to check at least a couple of times because if it is a connector or wire problem it might work some times but not others.