Abrupt Yaw Movement During UAV Takeoff at 1.5 Meters Altitude

Hello everyone,

I’m experiencing an issue with my UAV where it undergoes an abrupt yaw movement during takeoff. This unexpected change in yaw direction happens consistently when the UAV gains more than 1.5 meters of altitude.

Log1: https://review.px4.io/plot_app?log=0dc14ec1-4bc2-4299-89db-a76d0d2c4628

Log2: https://review.px4.io/plot_app?log=6335ff02-0917-4acd-bd09-cfe7947dc7e5

I believe the issue may be related to the magnetometer settings, specifically the EKF2_MAG_TYPE parameter, which I have set it to 0-Automatic. I am flying outdoors, thus I guess I am not suffering disturbances from large structures. Furthermore, I tested this with firmware 1.13.3 and 1.14.3, same result on both firmware.

Has anyone else experienced similar issues or can provide insights into how to resolve this?

Any chance you’re taking off over concrete with a strong magnetic field?

There is no magnetic field, we tested taking off from the grass with same results. We moved the GPS(and its compass) above one of the motors but didn’t help, because yaw jump of 11deg is present in 0.13sec. Also, it seems to happen a correlation between thrust and magnetic field.
One of the latest log, where it is not flying very well
https://review.px4.io/plot_app?log=aa5edf92-3790-443d-ac58-9ebf533bac11

Exactly. Can you move the external mag (with the GPS) further away from power electronics/wiring/motors?