Servers by jDrones

Compass Confusion Again!

(jwcalvert) #1


  1. Does the HUD in Mission Planner indicate True or Magnetic North, given that it knows the declination??

  2. I have two vehicles running latest APM software; a ROVER and a PLANE.
    Both have a Pixhawk and a combination external compass and a GPS.
    On both, the GPS appears to work great.
    On the ROVER, the external compass appears to work fine pointing N, E, S & W as expected when I rotated by hand in my driveway.
    But the PLANE’s external compass is truly scary. It points fine to the North and South but way off when pointing East or West.
    I am suspecting Orientation issues.
    On the ROVER, the Pixhawk and the Compass/GPS both point directly forward.
    ( I have orientation in the ROVER set to 0 for the internal, compass, external compass and AHRS).

But on the PLANE, the Pixhawk and Compass/GPS both point directly aft.
On the PLANE, I have tried several Orientation combinations and failed to find one that works. The Orientation descriptions are a bit vague when referencing the vehicle or compass or AHRS.

Can someone please solve this issue.
I have flown the PLANE three times, ( on Manual only ) and it seems to fly ok.
I do not want to try anything else until this is settled.

BTW, compass “live” calibration works fine on the ROVER but fails with only 3 dots on the PLANE.


(Marc Dornan) #2

Are you getting compass EKF errors when you move the plane around?

There simply is no getting around the fact that compass setup in planes (and Ardupilot in general) is poorly documented and poorly understood.

I believe that Mission Planner assumes that the compass is on the bottom of the external GPS and so rolls by 180 the external compass by default. If your compass chip is on top of the GPS board then this will be an issue.

Then you have the issue of AHRS orientation. If you have the Pixhawk on the plane not facing forward. Compass orientation in Mission Planner is then relative to the FC direction you have specified. For example if you have the FC yawed by 90 degrees (and have set AHRS orientation as such) and you have the external compass facing correctly forward, but have no compass orientation set, I believe you will have an issue.

Of course this get complicated if you do not have a forward arrow on your Compass/GPS. Then you have to find the mag chip, look up its specs, and figure out x,y,z. Normal is X facing forward, Y to the right, and Z down. Remember, if its on the bottom of the GPS board, Mission Planner assumes this and rotates the external compass by 180 for you.

I think I have this all correct from memory. It is most unfortunate that Mission Planner does not simply figure out accelerometer orientation and compass orientation for you by simply asking you to point the plane north and level and then move in west etc. Even an android app to set this up for you and tell you the correct parameter settings would be great. In theory you could strap you phone to the plan facing up and forward and I guess you could follow the prompts and hey presto all parameters would be set and no more EKF woes.

The skimpy wiki in this section and the lack of a configuration tool above simply dooms a lot of people to endless frustration with compass setup – even experienced users.

You can always safely disable the compass in Arduplane though. It is not really needed.

(jwcalvert) #3

Hi Marc,
Thanks for your reply, I really appreciate it.
As you can tell, I am really new to Ardupilot in a Plane. I have been running it in a Rover for 2 years.

My Pixhawk does face backwards so I set the AHRS orientation to #4 (Yaw 180).
The external GPS/Compass also faces backward but I set its orientation to #1 (Yaw 0 ).
All of this worked fairly well today for a while and then Mission planner erased all of the Offsets for both the internal & external compasses. Btw , the compass chip is on top.

Before that, I did several taxi tests on the street and the GPS course and external compass agreed really well when going north or south but were off by 40 degrees going east and west; any ideas?

Finally, why do you say that a compass is not really needed in Arduplane? That is really scary.

Jim Calvert

(Marc Dornan) #4

Trust me you do not need a compass for Arduplane. Not scary. Check it out. Many people disable it. Successive GPS readings calculate the bearing.

If the mag chip is on top then I assume you need to roll 180 in the MP compass set up.