Compass not accurate

I have calibrated my compass on the Pixhawk but it always reads about 20 degrees out if a lay a regular magnetic compass next to the plane.

How can I sort this?


The default compass settings correct for magnetic declination and will cause the aircraft to read true north and not magnetic north (the auto declination parameter is COMPASS_AUTODEC). So depending on where you are, a 20 degree difference between the two may be normal.

I also had a clone GPS/compass module that was 45 degrees off the marked orientation, that caused a similar issue. I had to change the compass orientation in parameters, though I also could have re-mounted the compass.

Magnet North is only about 2 degrees west of grid north in the UK so it can’t be that.