COMPASS_USE and EK2_MAG_CAL

I’m having a bunch of problems with magnetometer-based yaw measurement. Basically all my flying is in compass-denied environments, or there is so much metal around that the magnetometer is simply noise. As such I don’t care about magnetic north, I just need a consistent relative yaw measurement.

Lately I started getting “DCM Yaw inconsistent” errors when arming which is just obstructive nonsense it seems, since nobody uses DCM.

The comments at EK2_MAG_CAL say that I can set COMPASS_USE to zero and then “limited operation is possible”. What, exactly, would operate in a limited capacity and what are the limits?

Test with EK2_MAG_CAL set to 2, use just simple heading fusion all the time, but make sure your compass is well calibrated, and no interference from motors, if possible do Compass/motor calibration, let me know as well how your flight went with EK2_MAG_CAL set to 2

I have been experimenting with EK2_MAG_CAL=2, and 4 as well, so that it never switches between fusion modes. In my experience switching is nearly always a bad idea as it causes a huge yaw jump.

What I’m asking is specifically an explanation of the remark:

NOTE: limited operation without a magnetometer or any other yaw sensor is possible by setting all COMPASS_USE, COMPASS_USE2, COMPASS_USE3, etc parameters to 0 with COMPASS_ENABLE set to 1. If this is done, the EK2_GSF_RUN and EK2_GSF_USE masks must be set to the same as EK2_IMU_MASK.

Turning off COMPASS_USE is appealing to me, because at least in ground tests the attitude estimate seems to drift and jump less when I do that. But the phrase “limited operation” is alarming so I need to know what that means before attempting flights.

I am too flying multiple drones with EK3_MAG_CAL set to 2 to get rid of toilet bowling effect cause there was too much varying magnetic fields around my small quadcopters and i just wasn’t able to compensate that enough, though in my case, i am calibrating my compass in-flight in very strict fitness and i have also done compass/motor calibration on all the drones, and after this i had multiple flights and toilet bowling never appeared again, that’s why i suggested same in your case too

But there’s one more way where you can totally disable compass, though this feature is relatively new so not many people have tried it yet or posted much about it on this discussion forum, you can give it a try as well, but this feature is only available in master branch, not yet available on any stable release

https://ardupilot.org/copter/docs/common-compassless.html

I too like to know more about it from the developers, but i doubt unless this feature not made into any stable release before than only those developers who implemented this feature can help you out

Hmm, it looks like that requires a GPS which won’t work for me either.