Heading drifts by electromagnetic interference

If I arm the drone and float the aircraft, the azimuth will momentarily turn back over 45 degrees. The azimuth does not change slowly, but it is constantly twisted more than 45 degrees. I don’t know why. The EKF2 mag fusion algorithm seems to have influenced this.

https://logs.px4.io/plot_app?log=836e36e7-d4b6-4ff2-9039-f6a7d6740c6e

@jsoil21 Could you check if your compass sensor is close to the ESC or any source of magnetic interference?

It is located very close to the power source and is shielded with mu-metal.

@jsoil21 Then it would be a good test if it makes a difference if you have the compass somewhere away from the source of interference