When to choose MagFit or COMPASS_LEARN=3?

In looking into my yaw related EKF3 lane change event, it was pointed out that my compass was in need of re-calibration.

It’s not clear that that was the cause of the lane change event - but no doubt, I need to re-calibrate my compass.

I’ve used three methods of compass calibration - the manual method of whirling the thing around, the COMPASS_LEARN=3 automated compass calibration, and MagFit.

I actually had a little trouble using COMPASS_LEARN=3 the last time I tried it - the copter went unstable while experiencing yaw resets and I ended up with a rough landing and breaking some props.

Can someone please offer advice on the relative merits of these three compass calibration techniques?

Under a separate post, I’m also seeking advice on the proper MagFit options to set.

Thank you!

You don’t need to recalibrate your compass every time if it is properly calibrated, but if you want to do it one more time, I recommend you to do it in relaxed mode if you see so many errors like that. Also, you can send some onboard logs for people to look at it. Where is your compass located in your vehicle? You shouldn’t have some power wires (battery, ESC, etc.) close to it. Locate the compass module (mostly packed as a GPS module) as far as possible from power-related wires (not necessarily the 5v ones :slightly_smiling_face: though).

Mustafa - thank you for considering my post.

I think you’ll find the concerns you’ve expressed were properly addressed.

Reference: EKF Lane Switch - problem with yaw

And I take some issue with your response because you didn’t actually address my question - and since you’ve posted a response - others may not examine my post - thinking it’s already been addressed.

My question remains - When to choose MagFit or COMPASS_LEARN=3?

If you don’t have information that answers that question, I’ll have to repost it so that others still see it as an open issue.

Although I don’t recommend it, first you need to do compass learn 3, then for fine tuning, magfit.
Follow the related mag calibration wiki pages.
BTW I almost never used in flight compass learn, with initial magnetometer calibration, even with relaxed fit, my vehicles fly absolutely beautiful, even at really high speeds.
https://ardupilot.org/copter/docs/common-compass-setup-advanced.html

Thanks Mustafa - as it happens, I always start with a manual calibration initially.

I’m familiar with the wiki you suggest.

COMPASS_LEARN=3 was added after this wiki was written, and neither it nor MagFit are mentioned.

MagFit has been around a while. COMPASS_LEARN=3 is fairly new. I’ve used both. But I haven’t read anything that describes their relative merits.

If your recommendations about when to use either is based solely on your own personal experience - that’s good information. But I’d prefer to hear from someone in the DEV team who knows why these options exist and what shortcomings either of them have.

I appreciate and respect your enthusiasm. But I’m looking for assistance based on more technical merits.