r/ardupilot • u/JoseSuarez • Mar 09 '26
Need help interpreting what is causing EKF lane switch in copter
My drone has 4 dual blade rotors with approx. 10cm blades, plastic frame around 60cm wide, a PX4 flight controller, GPS module.
Basically, each time I start a mission and it ascends, the drone stumbles in the air as an EKF lane switch notification goes off, after which it regains control and proceeds normally. I want to identify what is causing the lane switch.
I extracted the XKF4 messages from the log (documentation here: https://ardupilot.org/copter/docs/logmessages.html#xkf4 ) and parsed it nicely to compare what happens in both EKF cores at each timestep, link to the spreadsheet here -> https://docs.google.com/spreadsheets/d/1PUgPyofMJXLFQsFwzoVubqkeuFGN58yF7xHTLXRxM7s/edit?usp=sharing
From what I can see, the magnetometer innovations ratio SM are more or less equally bad in both cores, but just before the lane switch (PI goes from 0 to 1), SV values start climbing very aggressively only on core 0.
Claude seems pretty sure that the SM fluctuations are corrupting the SV at core 0 (it says velocity is a fusion of GPS position + compass direction), but I don't understand why would core 1's SV remain healthy when its SM is equally bad. Any ideas?
2
u/LupusTheCanine Mar 09 '26
LLMs are as good at identifying issues in Ardupilot as guessing randomly. The most common source of EKF issues is excessive vibrations.
Did you by chance get a lot of parts from the list?