GNSS2 compass orientation in Pixhawk/PX4

With my configuration GPS and baro are working fine but I always get–even after running through the whole calibration process–“Mag sensors inconsistent”. Seems that I have to choose the right orientation of the Zubax one–what´s the right one?

The right orientation is when the arrow labeled FORWARD is pointed in the same direction as the autopilot, and the top (the antenna) is also pointed in the same direction as the autopilot. Since the patch antenna should be pointing up for optimal performance of the GNSS receiver, the autopilot shall always be oriented likewise.

I have had the same problem lately and i have been days on the prob trying to solve it.

I notice one very very important thing. Make sure the surface the unit is bolted on is perfectly flat!!

If it is not the compass can do all sort of strange things. To check what i am talking about you can try to gently pull up the front left corner after unbolting just that corner and if you have your magnetometer connected to the FC and to Mission planner you can see EKF going mad and compass variance and or mag inconsistent appear.


Hi Pavel, thank you that´s now clear. But there seems to be another problem that the UAVCAN-magnetometer calibration within PX4 seems to be broken Magnetometer Calibration seems not possible for external MAG on CAN Bus · Issue #10621 · PX4/PX4-Autopilot · GitHub . Can you take a look there and give me some hints, from the PX4 guys there does not seem to be much interest, so that I could fix that myself?

Eh, nothing comes to mind, but I will make sure to post if that changes. It’s been just four days though, so maybe somebody gets around to answer it. Otherwise you might have to fix PX4 yourself.

Hi…after some more poking through the code I found that desired magnetometer orientation is not supported. To my surprise, not all of the 24 possible 90-degree-divisible orientations are implemented. In general, list of orientations is messy and incomplete.
I disabled external compass for now, but I’m going to try adding missing orientation, and creating pull request after some testing.

order pcb