My Hexacopter measures 530mm motor to motor across the diagonal. The GPS module is on a mast 130mm above the frame, a bit off-centre such that its slope distance to the two closest motors is 240mm (200mm horizontally). I would like to reduce the height of the mast significantly to reduce damage during handling and, possibly, reduce vibration.
Is there any rule of thumb regarding distance between motor and current-carrying components? If I just go ahead and, say, halve the mast height, is there a parameter in the log file that will tell me if the electrics are influencing the compass?
If you have current monitoring then Iād say remount your compass as you want. Re-calibrate the compass as you normally would (with GPS lock, outside away from sources of interference). Then after you fly it run MagFit on the flight log. That will give you a proper calibration that takes the electrical noise into consideration.
Thanks Allister. I donāt have current monitoring. Iāve checked out Magfit in the wiki and it sounds very complicated. Anyway, Iāll try a shorter mast, recalibrate, and see how it performs in Loiter or Poshold modes, and then see if I can figure out how to use Magfit.
I replaced the tall, hinged, mast with a shorter (60mm) rigid one, and my test flights yesterday were so perfect (by my standards!) that Iām not going to even try MagFit. The hex hovered for a full 9 minutes or so in PosHold mode without any noticeable drift or ātoilet bowlingā, and landed within 2m of launch point on RTL. It also responded well to my inputs while in PosHold mode, and stopped quickly when I centred the sticks.
You should run Magfit anyway. Without current monitoring donāt select compass motor compensation. If like others you got as far as ābuild/Sim Environmentā in the Wiki page and ran away you donāt need anything other than MAVExplorer and a icon for it on your desktop. Drop a log on it and follow the video guide. Nothing to it.
Edit-Actually there will be a new WebTools based Magfit live soon so if you are afraid of MAVEplorer this will be easier to use. All the WebTools run in a browser.
Like @dkemxr , I just run magfit in MavExplorer. But this new webtool sounds good!
@abenn1 , if you donāt want to install MavExplorer (but you shouldā¦) then post a log here with a short flight. About 5 minutes, with a bunch of turns. Nothing crazy, but fly around for a while and make sure itās traveling in all directions. A couple of figure-8s are good. Post the .bin file here and one of us can run magfit for you.
As it happens I had some time this afternoon so installed MavExplorer on my workshop laptop, following the wiki instructions. But what I donāt find on the wiki is any advice on how to interpret the results once a log file is opened.
Hereās the graph of compass readings from one of my hexcopter flights, but how do I know if itās good or bad? If bad, what do I do about it?
Next flying day Iāll do a few deliberate figure eights to get some decent data; this flight was mainly hanging out taking video of our flying field, though Iām sure there was at least one 360 degree turn.
Nothing there other than zoom/window a section that doesnāt include take off and landing and then open the Magfit Tool. Watch the video again, you havenāt processed anything.
Youāve lost me there Dave. That plot does include take off and landing, though I appreciate itās only comparing GPS data with compass data without processing anything. The wiki page that I was looking at doesnāt have any video. Is there a better one for explanation of how to use it?
Iāll run the graph you suggest this afternoon Allistair, and then run Magfit.
Iāve just completed a Magfit run using the parameters you suggested Allister, and the output data are exactly the same as yours. The ācorrectedā graph looks pretty good to me, if Iām reading it correctly:
Having now read the wiki referenced by Dave I see that I should really make another flight specifically for MagFit, ensuring that I do some 360 degree turns, and filter the input data to exclude take-off and landing, before altering my compass parameters.
One last thing; since Iām not using current monitoring, should I not leave COMPASS_MOTCT at 0, rather than 2 suggested by MagFit?
If you donāt have current monitoring then you might want to try running Magfit again, but this time without CMOT. See what numbers it gives you. If the corrected graph looks good then I would run those values on the drone. You can try a magfit specific test flight again and see how much the numbers change. In my experience as long as the initial flight log you used has some good 360 turns in it, then it should work just fine. But your mileage may vary so it doesnāt hurt to check.
Thanks Allistair, Iām beginning to get the hang of it. I ran the same .bin file again but with CMOT unchecked, and some data are significantly different:
Since I canāt be 100% sure I made any significant yaws during that flight, I will make another flight before I alter any of my params. Iāll also then MagFit my three Arducopter helis even though they all seem to be flying well.
My experience with Magfit has been so good that I canāt figure out why I held out for so long. Once the drone is flying I run the calibration and done. Let us know how you make out.
I made a couple of flights in Stabilise mode with plenty of 360 degree rotations, and Iāve since been away for a week, but now I canāt get MagFit to work:
Starting MavExplorer, getting the .bin file, and graphing it with Sensor > Compass > Compass selected is not a problem. I then use the magnifyer tool on the graph display to select only the part of the graph that doesnāt include take-off and landing.
When I then click on Tools > Magfit and select the settings recommended by Allistair 13 days ago and click on Run, I get a scolling stream of error messages in the black UI screen