Error: Compass Variance

Hello,

I’ve flown the drone multiple times without issues. However, during my last autonomous flight, I encountered a problem. After switching to RTL mode, the drone was descending normally, but just before landing, it began spinning erratically and eventually crashed.

The last error message I received was a “compass variance” error and a bad GPS fix. I suspect it might be due to interference—possibly from a nearby generator at the flight location, or perhaps from the lithium-ion batteries, although we had them well-isolated.

I’ve attached the flight logs. Could someone please help me analyze them and identify what went wrong?

Thanks in advance!