Problem with setting external compass for navio2


We have been tired to set an external compass for Navio2, but we could not.

We have a GPS+Compass, where the compass is connected to i2c port and GPS is connected to UART.
We have configured -B option for the external GPS and external GPS works fine.

However, the external compass is not detected.

Even through we configured to use Compass 3, which is external to be the Primary compass, this is not considered (please see attached image).

When I move the compass manually, there no change in orientation of the drone, but if I move the whole drone, the orientation changes. This means it is using internal compass instead.

Can you please tell how to configure Navio2 to use the external compass.

We use different GPS+Compass modules and different Navio boards and it is always the same thing.

Please help on this, we are stuck for several days.



I have a Navio2 with external compass (GPS + Compass from Drotek)

I did my configuration with Mission Planner, but here are my settings using QGroundControl.

My external compass is set as external, primary and Roll180 as the compass is below the GPS.

First you can check compass is on the i2c bus

In terminal (SSH) run the command sudo i2cdetect 1

Result could be:


If I understand some info on the forum, 1e is my compass.

Then in QGC, go in the parameters page, Advanced, Compass

On the top of the screen, you can see how many compass are detected (compass_DEV_ID),

There are three compass,
ID and ID2 are internal, ID3 is external

There is a confusing parameter…? COMPASS_EXTERNAL, EXTERN2, EXTERN3

EXTERN3 is defined external and is the i2c external compass…

At the end of the page:

You can verify the orientation of the external compass: COMPASS_ORIENT3 Roll180

and COMPASS_USE. I choose to use all, with external as primary…

If you do not have detection on the i2C bus, cross the sda and scl lines. and redo the detection.


Thanks for your reply. I tried all the things you mentioned, but still it seems external compass is not overriding internal one.

First this is my drone setup

Second, I verified that the compass is connected and I can see 1e when I call i2cdetect

Then, I have configured the parameters as you mentioned in QGroundControl.

I verified the ID of the connected compasses and I set Compass Three (external) as Primary

and here are the IDs of the compasses

I also enabled all compasses

But still, when I move the GPS+Compass alone, I do not see any change in the orientation of the vehicle, but when I move the whole drone the orientation changes, which means it is still using the internal compasses I guess.

Did I miss any step?

Thank you


I’m not “code specialist”. As I understand some information, compass provide a reference. So “North” direction is know. When we move the Navio, angular variation is detected (gyro and acc), and indicated heading change.

If heading variation is coherent with compass reference, all is good. If not there is a correction and indicated heading is good.

Some clue from observation: If you have no compass calibration or a bad one, you can see heading changing in the HUD without moving the Navio. During flight, if you switch to Loiter or Position Hold, your copter is chasing is position (toilet bowl) due to bad compass reference.

Test at home:

I did not change my configuration. I move the Navio 10° left or right, the indicated heading change follow the movement.

I rotate my external GPS, the indicated heading change at slooow rate to the new heading.


Thanks a lot
It makes sense to me!
Got it

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.