Accuracy of the compass

Hello

I have two different compasses, how do I compare their accuracy? Is it even realistic to determine the accuracy of the compass?

Thanks!

You can usually see on mission planner if the GPS heading and magnetic heading diverge, it looks like the vehicle is crabbing.

One never knows how much the poster of a message knows. I hope this is at a level that works.
I’ve done some of this and might have something useful to share - let’s see… One thing you could do is look at the log file Mag_0 and Mag_1 time histories. Use the compass on your phone to check you heading read out on your phone vs the heading from the GCS. If you are doing this with the props on (probably not recommended) you will be working with the vehicle disarmed. So be sure to set the LOG_DISARMED to 1 so you get logs without arming. The values should show the same character/trends (if both are oriented the same). They will be different but within 100-200 mGaus is likely fine. The real problems can appear when you are pushing power through the system. So then you want to look at those same traces as a function of current Batt[0].curr, Batt[1].curr… It’s a good idea to have at least one of you compass devices on an extended mount. More power → longer mount. I don’t have a lot of quantitative things to hand out, but the mag trends and your desired vs actual yaw while hovering stationary, or even before takeoff, should give you an idea of the viability of your compasses. Toilet-bowling bad!!
For sure, do the calibration process, but everyone knows that right? So, yes it is realistic to compare, and the trends and comparable are what you want… after calibration. Might be worth comparing before and after calibration to see that your calibration did something good. Another thing you can do is turn on your vehicle and leave it get a GPS fix - then check your heading read out. The EKF will only have the compass for heading at that point so it is based on only that. Then take your vehicle for a little walk - a circle of 50’ is plenty. This will allow the EKF to have additional information to determine heading. Take it back to the start and watch the heading readout. It will drift back to what the compasses tell it. If the magnitude of this change is less than 10 degrees you are probably ok. Some folks seem to like Magfit and in concept it’s a great idea - I have not had success with this so can’t recommend it, but maybe some variation of this tool gives good results. Hope this is useful. Good luck! Oh ya - if using your phone be sure you have it on magnetic north.