Compass issue after calibration

What could be the cause when after successful compass calibration the compass would point to the correct direction. During flight it might do a yaw re-alignment. But after landing and/or soft/hard reboot the compass would point in the wrong direction.
I have had days where I can do 5 good flights and on the 6th I encounter toiletbowling. After battery change the compass direction is 180 degrees off etc.
I have attached 2 of the worst logs.

There’s a ton of current related interference. I tried running magfit on the flight a couple of times but each time it errored out saying “too many iterations”. I think that means it’s too bad for magfit to correct.

You may need to move the compass module or battery/ESC wires, or look into some shielding. From what I see this is going to require a physical fix before you can tune it in software.

As for why it works sometimes and not others: That might be a case of sometimes it works “good enough” that you don’t see the issue.

I just noticed one log showed two compasses, but the other only showed one. If you have an internal and external compass on your controller then I’m going to suggest to just use the external because often (not always) the external is better. In this case you may need to tinker with that.

ArduCopter 4.3 is outdated, update to ArduCopter 4.4.1 or newer.
There might be some fixes that are relevant for you.