I am having trouble to calibrate the internal compass. When selecting compass 1 and compass 2 as internal and external respectively, compass calibration fails every time. If I select only the external compass, which is the gps/compass module, calibration is fine. How do I check if the hardware is working or if it might be a bug?
It can be a real pain and while I try on new builds, I usually end up just using the external compass.
Basically, the internal compass will be so close to the frame, motor and various other electronics that it’ll be near impossible to get a reliable calibration.
Starting to think why they all put magnetometers inside boards if they are nearly impossible to use and cause just pain and confusion when doing calibration…
On board or Off board, you still have to be cautious.
Exemple 1: years ago, it was a ZeroUAV card with external compass-GPS
I was not able to calibrate, guess what? I had the GPS puck over a 3mm steel screw…
Exemple 2: an equivalent PX4 card, mag on board, on the frame with Battery cable loop below, bad calibration results as expected, without loop, it is better.
Exemple 3: a modern card with no compass on board, and 2 compass on the GPS puck, no problems if you are cautious with GPS placement.
Exemple 4: …
There are as many situations as users. We have to be cautious with our installation and settings. Good results can be obtained with moderate cost hardware and bad results with hight end products. Clever action should produce good result.
My point was that since almost all internal magnetometers are nearly unusable and these days nobody uses them, why they keep on putting them on.
Because, at some points, APM and PX4 creators did it and followers have no clue or do not want to invest money and manpower to undo that. Chip makers are also involved, by producing compound products (Gyro, Acc and Compass in the same chip).
True but those IMU’s are targeted primarily at Smartphones, Tablets, etc so we gain by being able to use relatively cheap devices. But it sure is true that internal mags are mostly useless. I had one Plane where the mag was usable, but Copters no way. Plus, there really is no redundancy function in Ardupilot to switch mags so there isn’t much point in enabling them anyway.
Thanks for the feedback. Mission Planner goes into an endless loop trying to calibrate the sensor. I end up by completely disable it and only use the external sensor.
On my Navio+ I just stop trying to get the compass right. It calibrate correctly but once I start flying, I get the dreaded compass variance error. I have been flying like this for over a year.
This is the best program to follow. ArduPilot cannot switch mags anyway if one fails, so there’s no sense to turning two of them on.
The internal mag is handy if you want to fly without a GPS unit with a mag chip in it. And then calibration doesn’t matter so much. It is more than just a compass. It’s a magnetometer and it knows up from down and sideways, as well as direction.
I’m having the same problem with a CUAV v5+
Why I’m posting, after reading, is because I have tried to just calibrate the internal compass and it works and calibrates beautifully. Try it, just unplug the GPS.
Idk but it seems to be something other than too close to the frame. I think it has to do with orientation. I say this because qgroundcontrol gives me that error. Also when playing around, trying an old 3dr external compass it changes the orientation to yaw90 when the airplane logo is facing forward…
I’m thoroughly confused!!!
In general, it’s very hard to get decent calibrations of the onboard compass. Most people use the external compass on the GPS. I can recommend the CUAV gps.
Thanks, Thats exactly what I did. It worked and calibrated great.
I think the problem with other cheap compasses/magnetometers is their marked wrong. I cant be positive but if the orientation of the chip (on on boards with the same chip) matters then Ive found different x, y, z marking from 2 different boards. when i orientated the chips the same as the working board it worked.
I was using a old 3dr magnetometer when having the problem above. I found if I changed the orientation by 180 degrees it would work ( I stopped getting the compasses not aligned message anyway) but don’t trust ir.
in any case the CUAV compass works great.
thanks for the reply
It’s often the same problem for expensive magnetometers too. (marked wrong or not at all).
The Advanced compass calibration guide in the docs is essential for making sure the orientation is set correctly.
I spent days trying to get a Here GPS module to behave. it got a big fat arrow on the top, made specifically for this, it should be right, no?..and no it wasn’t. Wasn’t mentioned anywhere in the documentation, etc.
The 3.6 code will automatically detect and set the orientation. So if the calibration determined it is yaw 90 orientation it’s probably fine if it calibrates with good offsets.
correction, I think it was yaw180 on the old 3dr compass/magnetometer. just in case someone reads in future.
Thanks for the info guys!