My rover is having compass issues. (PX4 + M8T + fake M8N)
I took it out into the wild for testing yesterday. I’ve added a fake M8N to my M8T, pretty much just for the external compass. Both GPS are getting 14+ satellites and GPS status of 4. My GPS heading is perfect when moving, but my compasses were off dramatically.
When I started, my compass heading was about 45 degrees right of (accurate) GPS heading. I tried calibration a few times (difficult on a 150# rover) and the problem got worse. Now it’s about 120 degrees right of actual heading.
I’ve done a lot of search on the topic, and found the helpful post by @TeknoMike on compass configuration. Unfortunately, with one compass enabled, tuning always fails. I have this significant deviation. With both enabled, they aren’t even close to the same heading, which causes an error.
Question: Can I just input a manual compass offset? Let the thing calibrate (incorrectly) and then just input a -Yaw offset? Once calibrated, the error is consistent.
Have you tried the compass learning technique? It works well for me with my large mower. Prior to its introduction, I struggled just as you are. You can set a switch to enable it and then drive around in manual with lots of turns until the message appears that it is complete.
As far as I know there isn’t a specific parameter for the calibration routine. You set ch7 option (or another channel) to “Compass Learn” on the main tuning screen in Mission Planner. Then have the messages window open and flip the switch momentarily. You will see the message “Compass Learning Started.” After you drive around a minute or so in circles, you will see “Compass Learning Finished.” You will LIKE it!!!
I have only been using Ardupilot (Rover) for about a year, so I do not claim to be a good one to answer. Perhaps others will jump in, but I do have a few observations that you can use to build your own opinion:
As far as multiple compasses, I would not think you would get much of an improvement. In my experience, the problem with compasses is not that the device itself is highly inaccurate. The problem is that the earth’s magnetic field is very weak and so any electromagnetic sources in the vicinity of the compass module will interfere and cause an offset. So, I think each compass would see the same interference. Perhaps if it is located away from the first, it would get a different reading, but which is correct? I think you would be better served trying to get one good external compass located where it will be less susceptible to interference, but that is a tall order.
Calibrating live, with the Compass Learn function, with the interference at its “normal” level is what I think is the best way to get a good reading. In the case of my mower, I have found a significant difference in compass reading with the mower blades turning versus not turning. I documented this in this video: https://www.youtube.com/watch?v=gBn3Eygo88o. So, if I am just running the mower in a tuning or practice mode without the blades running, I do a Compass Learn with the blades not running. If I am going to mow, I do it with the blades spinning.
Depending on your budget for your rover, what I think is the best way to get accurate heading is to use two of the new, great ZED-F9P RTK GPS units on your rover in a Moving Base setup. That should give spot-on accuracy. I plan to try that on my mower at some point. I am using an F9P on my rover now, with an F9P stationary base. I will add a second F9P on the rover for the compass function. ALTHOUGH, I must say that as long as I calibrate with the Compass Learn function, I get pretty good heading.
That’s my two cents, and it is worth every penny (and probably no more!)
Thanks again, Kenny.
As I said in the previous post, your experience has been very helpful.
I agree that the F9P units are probably a better choice than the M8T that I bought. Cost is an issue, though, as this is just a stupid (and expensive already) attempt to mark some lines once a year. I’ve learned that I probably won’t be successful without quite a lot more effort and money. And that’s OK, it’s fun anyway! If nothing else, I’ll have a nice RC mower/snow plow or something my kids can mess around with.
I had pretty good results on Saturday with PID tuning. Even with the severe compass offset I was getting decent results. If I was mowing with a 50" deck with 12" overlap I would call it good. But I’m trying to shoot an 800’ straight line. Quite the challenge.
I’m hoping that guidance will be improved when the compass heading agrees with the GPS heading. I’ve got the M8T on the rover, and the state NTRIP network for RTK.
As an aside; How can I tell what my accuracy is? Is it GPS HDOP? And is that in decimal meters of accuracy? I have seen .4 or .3 HDOP numbers, but I have no idea how to tell if that’s raw GPS or what, if any, the NTRIP feed is contributing.
I actually dont know how to tell the accuracy in Ardupilot and Mission Planner. I need to learn that also. You can connect to the GPS units I have with a computer via USB and run ucenter and get a horizontal and vertical accuracy estimate.