Finding the root cause of EKF3 lane switch due to yaw innovations

Flying one of my standard test missions today, my copter got an EKF3 lane switch.

The copter continued the mission successfully - and I repeated it again right after this mission concluded - no further problems.

I would like to see how much I can learn about the cause of this lane switch. - to see if there’s anything I can do to prevent it’s reoccurrence.

I first looked at MavExplorer EKF3/Normalised Innovations and found that there was a spike in XF4(x).SV at exactly the time of the lane switch: 14:38:14.632

Using Mission Planner I found that all three EKF’s had a spike in SV at the time of the lane switch.

From here I need some guidance.

Since all three EKF’s had the same spike in SV, does that mean that the lane switch accomplished nothing - the firmware simply tried a different lane to see if another lane was OK?

(If so - I suppose no lane switch was necessary - but probably good to do anyway.)

I’m trying to understand if any of this points to a likely hardware of software problem. Do innovations on all three EKF’s generally point to software or hardware issues?

If it’s hardware - I’ll try to fix it by repair or replacement. If it’s software, perhaps the DEVs would like to take a look at it.

I’d appreciate any advice or input on next steps I can take.

Thanks you!

ADDENDUM

Since I repeated the mission directly after the one with the lane switch - you can see the effect by comparing the two flight path maps.

The lane switch occurs as the copter approaches waypoint 20.

This is the flight path on the following flight with no lane switch.

Those paths look very good apart from that glitch.
I couldnt see what caused it, though many others may be able to.

I ran magfit over that log and your compass settings are pretty close, you could adjust them to these if you want to be a bit more exact:
COMPASS_OFS_X -91
COMPASS_OFS_Y -67
COMPASS_OFS_Z -7
COMPASS_DIA_X 1.033
COMPASS_DIA_Y 1.014
COMPASS_DIA_Z 0.897
COMPASS_ODI_X -0.029
COMPASS_ODI_Y 0.072
COMPASS_ODI_Z -0.129
COMPASS_MOT_X -1.215
COMPASS_MOT_Y -0.061
COMPASS_MOT_Z -1.027
COMPASS_SCALE 1.00

COMPASS_OFS2_X -226
COMPASS_OFS2_Y 30
COMPASS_OFS2_Z 254
COMPASS_DIA2_X 0.985
COMPASS_DIA2_Y 1.053
COMPASS_DIA2_Z 0.800
COMPASS_ODI2_X -0.013
COMPASS_ODI2_Y -0.013
COMPASS_ODI2_Z -0.016
COMPASS_MOT2_X -2.408
COMPASS_MOT2_Y 0.882
COMPASS_MOT2_Z 1.608
COMPASS_SCALE2 1.00
COMPASS_MOTCT 2

and unrelated but attitude control looks really good.

1 Like