Arduplane multiple compass issue

Hello,
I have problems with arduplane and a pretty basic HW setup.
I am using an pixhawk 2.4.8 with integrated compass and a gps module that also has a compass.
When I go into MP, both compasses are recognized properly. compass 1 as internal, compass 2 as external.
The only issue is that every time I try to arm arduplane with “compass” selected as a pre-arm check, It tells me “Pre-arm: compass not calibrated”.
However, I have calibrated the internal compass multiple times already, and I think succesfully:
I tells me that calibration was succesfully and I should reboot the FC.
Then I do so, but after reboot it still shows the same error message when I try to arm the plane.
Do I have to calibrate the external compass too, and if so how to do that ?
Is there a way to tell from mission planner if the compass (or accel for this matter) has been properly calibrated ? Because the screen looks the same weather I already did the calibration or not ?

One more thing:
I noticed that when I look at the HUD, it tells me “PreArm:Compass not calibrated”.
When I use the “arming” command, I get the following:
Capturemp
But the documentation says:
“1. The first cause of the Pre-Arm Check failure will be displayed in red on the HUD window”

If the ordering in the popup-window is correct (“GPS HDOP 4.6 (needs 2.5)” before “PreArm:Compass not calibrated” the compass would actually not be the reason for the failed arming.

And here is how it looks when I do the compass calibration:

Both compasses need to be calibrated, not just the internal. It’s calibrated the same way, and the same time. When you start the calibration both compasses should be connected and you should see both bar graphs moving. They may not move in sync but they should both be moving.

I don’t think the order of the errors is important. Either one on its own will prevent you from arming. If you’re inside a building or have bad sky view, that may be the reason for the HDOP issue.

That’s interesting, because when I start the compass calibration I see only one bar moving. Any idea what could cause this ?

I don’t have experience with your exact setup, but I’d start with the simple stuff: First check your wiring. Make sure you don’t have a bad pin somewhere. If you have access to another compass module plug it in to see if it can be calibrated. From the screen shots the FC is recognizing both the compass and GPS so that’s a good sign.

For troubleshooting you could try to disable the external compass and then leave the plane outside to see if the GPS error clears up.

I am using an Ublox NEO-M8.
It has two connectors, one for GPS and one for the compass (i2c)
To troubleshoot, I did the following:

  1. adjust the ordering, such that the external GPS is at priority 1
  2. disable the internal mag (now at position 2)

After a reboot, the heading in mission planner is still working, so I suspect that my external compass is working fine.
Now, when I click “mag calibration”, bar 1 is moving again only, but this time this is what you’d expect (since external and only mag is now mag 1)
However, the mag calibration doesn’t go through (yet, I’l try a couple more times)

I found someone with a similar issue.


I’d like to check if I got the magnetometer orientation right, but unfortunately I still don’t know how to display the raw values of both internal and external compass in MP.

What leads me to believe the orientation is not right is that a) I am using a clone and b) if I only use the external compass the artificial horizon can go crazy sometimes.

I also have an holybro unit with included GPS unit, but missing some connectors for it so i am using these clones in the meantime.

If you are flying a “simple” airplane, not a vtol, you do not need any compass.
Arduplane will use the GPS path to determine its heading.

Well, the integrated compass is not faulty, I’d rather just remove the pre-arm check for that :=)
Actually I have already flown the plane once but only in FBWA mode.
First, I’ve uploaded my Pixhawk 4 (holybro) with arduplane and can confirm, if I “calibrate” the compass there (different compass since different pins) both bars are moving in mission planner.


So the question is:
Why is the second calibration bar not moving when I calibrate with my other setup ?
I think I have already excluded a misfunctioning external magnetometer, since the heading output in MP works fine when the external mag is the only source of raw data.

After a lot of testing and reconnecting and changin parameters the secondary compass suddenly now also moves in the calibration. I don’t think I have any special parameter set,(or don’t remember it) which kinda sucks, since I cannot give an exact explanation why I had this issue.
However,here are some debugging steps that might help other users when dealing with compass problems

  1. Make sure you set the orientation right. Changing it in missionplanner from the compass tab does not work, use the parameter list.
  2. To make sure you got the orientation right, use this tutorial (it shows how to display the raw values & how to make sure they are moving “in the right direction”:
    https://www.youtube.com/watch?v=8gf1Ept5D08
  3. As many compasses as you have selected, as many “green bars” should move during the calibration step
    If they don’t, MP might tell you “Calibration succes” even though only one compass was calibrated / nothing was calibrated.
    Might be a bug in MP / Arduplane.
1 Like