EKF Error w/ flyaway near end of Auto Mission

I was wondering if someone could help me diagnose the EKF error towards the end of the mission in this log:
https://rinconconsultants.exavault.com/share/view/hn28-97xwy8v7

It is kind of odd, in the KMZ the hex appears to have veered off to the North at the time of the EKF error, but in reality it was headed south before I switched to AltHold and brought it home.

Specs:
F550 hex frame
Pixhack
M8n
internal compass disabled
Feiyu gimbal
Tarot retractable landing gear
3s battery

Let me know if i need to provide any more information. Thanks!

Looking at the logs I do see where the calculated position and the GPS position diverge. They stayed that way for quite some time. This causes the EKF error as the two position do not agree.

It looks like the copter flew North though. Did not see were it went south at all. It looks like the copter flew to your Left as you were looking at it.

At the time of the incident I can see the GPS had some issues. The HDOP climbed very high and the number of Satellites dropped to 8. It looks like a GPS issue. It seemed to clear right after that.

Mike

I see two ‘DATA_EKF_YAW_RESET’ events in the last phase of your flight. I am not an expert but I think because of compass failure or some magnetic field the yaw estimation encountered problems. Thay’s why the Logs show different direction towards north instead of south.

Thanks for the insights!

The discrepancy between the logged flight path and the actual flightpath is the biggest headscratcher for me. If you draw a line from the point of divergence to the home position and mirrored the last part of the flight across that line, that would be the actual flight path.

Its as if the compass all of a sudden decided it to flip 180 degrees and the copter was calculating its position based on the IMU instead of the GPS.