It does not happen in VR mode. I find that puzzling. Did you say that it used to work OK?
One more thing that I should have said sooner, is that I would recalibrate the mag sensor. Be aware that the calibration is always gathering data, not just when you press the button 6 times.
I would also look for loose or cracked components (motor, arm).
For mag calibration:
- be far away from large things and metal things like car, LP gas tank, tall buildings, maybe even a watch
- it is best to use telemetry, not USB cable
- once calibration is started, do not put the model on the ground
- don't rotate it very fast
I see that you are using a standard PixHawk GPS/mag Do you have Aux Mag Usage set to Aux Only (this is not default)? (You should.)
You should also be using the default GPS protocol of Ublox (not NMEA).
I am guessing that RTB hover still lets you control yaw. Maybe next time you could try slowly rotating yaw around 360 degrees while in RTB hover.
Here is a link to a fast east west oscillation that we never really did figure out.
https://forum.librepilot.org/index.php?topic=382.0