I'm having a battle with my compasses. I use pixhawk clone and M8N GPS with compass.

I'm unable to find orientation setting, where I will not have EKF compass variance errors.

I think that this is not mag interference problem because this happens when disarmed.

I've disasembled external GPS/compass puck and there are following axis markings:

           x axis

z axis  O------->


           |   y axis


My APM configuration is in the attachments, and also example values when facing north.

Do I have faulty compass? or I've tried wrong Orientation settings?

Views: 2820


Reply to This

Replies to This Discussion


Is your compass mounted upside down?


David R. Boulanger

please send pictures of our quadcotper

ps : Boulanger and Patissier, good team !

I don't think its upside down. Pixhawk is inside the frame mounted pointing at front, and compass is with arrow forward. The board inside is mounted (as it came from factory) 45 degrees turned (like an diamond) but compass chip has also arrows pointing as I wrote in original post with Y axis backwards and X axis to the right.


And this is disassembled part.

GPS antenna on the top, and the second image is from the bottom side


Well...  In the screen shot you posted you had roll set to 180.  You may want to change your COMPASS ORIENT Parameter to 0 and see if that helps.  I'm not sure why the Y axis arrow is backwards or if it has anything to do with the problem.  If it did then when you pointed north it would say south.


David R. Boulanger

Thank you David for such quick responses :)

I've set Compass_orient for compass1 to 0, and raw values from both compasses seem pretty close, but EKF does not aproove.


I'm not sure but I noticed you did not have a Gps fix.  Is the big square part of the GPS (Antenna) pointing up .  I honestly don't know if not having a good GPS fix will cause the variance error to appear.  The EKF may require a good fix to prevent the error.


David R. Boulanger

P.S.  Just trying to help the best I can

I does not have fix as I'm indoors, and GPS antenna is pointing Up, when mounted as on one of pictures. When GPS antenna is up, compass is down. I can go out and try for GPS fix tomorrow.

By the way is there any method how can I find out what is correct compass_orient setting for my compass?

I've tried the hard way - change compass_orient - reboot - calibrate compas - reboot and compare both compass raw values via status page.

See what happens when you have a GPS fix.  Do you have a window you can put the copter by now and see if you can get a fix?


David R. Boulanger

Based on the pictures I think Orient of zero is what you want.


David R. Boulanger

Usually, there is a small hole in the compass component to mark a direction - it's depend of the manufacturer but if you know the reference, you should be able to find it.

Reply to Discussion


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service