I have tested this with the latest 3.4 dev version and have found that if you disarm after flying for a while and then change flight modes the compass offsets for compass 1 change.
This happens both with Pixracer and Pixhawk hardware flight controllers.
This requires hooking the unit back up to Mission Planner and changing them back.
This bug has been fixed in 3.4 dev caused by a bug in EKF causing it to save the compass values it learned during flight. Even though compass learn was turned off it still saved new values. This bug is still in 3.3.3.
Hard to call post#3 a “solution”!
And your description is not totally clear as to exactly WHEN the offsets get changed: “while flying”, or after disarming, or when you then change flight mode… For instance, if I should land and instead of disarming, just disconnect power to the FC, do the offsets still get altered? If there is a reliable way such as disconnecting power to avoid offset change, then we can still use 3.3x as it seems a fix of the bug is only to appear for 3.4…
I wouldn’t call it a bug either. The option to use EKF to calibrate compass is still there in RC1. However, what confuses me is that using EKF to update compass offset is like using a predicted state to correct a measured state. Perhaps this is why the new offset obtained from EKF is really throwing off the compass heading.
It only gets changed once the unit disarms. If you write the numbers down and then check them after flight you can change them back to what you wrote down. They do not updated in mid flight.
When you bring up the Compass calibration screen the numbers are shown along the bottom of each compass as OFFSETS. Write them down. In the Full Parameter list they are listed as COMPASS_OFS_X, Y, and Z.
You can also save them to a file in this screen and later compare them to see what’s changed.
I’m still a few weeks away before I finish the build which will use 3.3, but from your message it seems that to avoid compass offset change we should arm, fly, land, and then disconnect power to the FC, and NOT DISARM first. I’ll be testing this hypothesis, but if anyone has occasion to do it before I do, please let us know.
I never allow auto-learn for the compass, once you get good offsets what’s the point of having them changed by a rather opaque process? I don’t even trust the compass calibration routine of MP, I use it to get in the ball park and then manually tweak the offsets while turning the copter on a tripod. Only by this method can I get offsets which produce < ± 2° compass accuracy all around the horizon and with up to ~25° pitch or roll.