Compass calibration process stuck in a loop

Hi, I am trying to configure a GPS+compass to my drone, but there were some issues.
When I was calibrating the compass of the drone indoors, the progress bar reached 100% and then reverted back to 0% repeatedly.
I’ve checked that the mag field is within the allowed range (max: 875, min: 185), changed the tolerance to relaxed and also tried setting COMPASS_AUTO_ROT=0, COMPASS_OFF_MAX=3000, and COMPASS_ORIENT, but none of them solved the issue. Can anyone help me out?

Go outside. Get away from sources of interference. Make sure you have a good GPS lock when you calibrate the compass.

Once the drone is flying use MagFit to really dial in the compass settings.

And follow this post to get your drone setup:

Thanks for your reply! I’ll try it outdoors with a good GPS lock. It would be better if there were some prompts after the calibration process, such as indicating the need for GPS lock or mag field error, instead of just looping continuously.
Best Regard!

It’s in the instructions:


It is important that when compass calibration is done, the vehicle have a good 3D gps lock, in order to assure the best setup. If necessary, move outdoors in order to get a good 3D gps lock before doing the compass calibration.

Is that warning worded properly? Compass calibration determines offsets from on-vehicle source’s of interference. The reason for good GPS positional data (lock isn’t a good descriptor either) is to determine declination. They are really 2 different things.

1 Like

That’s just a cut and paste from the wiki. I’d like the warning to be a bit more explicit about getting outside so you’re away from external sources of interference. For most first-timers, do you think there’s a lot of value in getting into the weeds about why there should be GPS positioning information? Not having looked into the code (and wouldn’t know where to start), is there a minimum HDOP that the calibration process wants before it accepts the positional information?

Yea I know I read it in the link. I actually do think it’s useful for anyone to know what calibration is actually correcting for and what declination is. It answers the question about why cal is not required in different geo locations.

When EKF is satisfied with position. That’s why we see complaints that they can’t arm but “lock” has been achieved.

You want to see this “ EKFx IMUx is using GPS”

1 Like