Question regarding APM 2.6 external compass (and GPS)


I was testing out my new APM 2.6 with the external Ublox GPS and magnetometer.

I noticed that he heading i.e. current heading of the quad seems to be indicating relative heading instead of absolute heading when viewed in the Mission Planner.

When I power up the the APM via the USB and connect to the MP the current heading immediately shows that the quad is facing north (irrespective of the hdg orientation) and thereafter when I change the quadcopter heading it indicates change in heading with respect to the heading when it was first powered up. Shouldn’t the heading indicated always be true heading?

Also, when I turn just the GPS+Magnetometer unit (without turning the quad) there is no change in hdg however when I turn the entire quad then the hdg changes (even if the GPS+Magnetometer unit is stationary).

BTW I did a short flight in stab mode and with simple mode - the quad behaved normally. Haven’t tried anthing else.


I was expecting a quick reply to my post from all you experts out there - HELP PLEASE

I reloaded the firmware afresh (3.0.X) on my APM 2.6 and did a compass and accelerometer calibration.

However the system behaviour is unchanged - the hdg shown in the Mission Planner is always north when the board is powered up irrespective of quadcopter hdg orientation at power up. Thereafter hdg changes wrt north when I change the quadcopter heading. Also, merely changing the GPS/Compass module hdg while keeping the quad hdg fixed does not result in any change in hdg in the MP. Conversly if I change the quadcopter hdg, even though the GPS/Compass module hdg is unchanged, the MP reflects the hdg change. BTW I loaded a fixed wing code in my APM 2.6 - the compass behaviour is the same.

When I tried with my older APM clone boad (from RC Timer) the hdg indicated in MP is always true hdg (firmware 2.9.x),

Ideas/suggestions eagerly awaited

What version of the MP are you using?
Have you set the compass orientation correctly in the MP? Remember that the compass is upside down on the combination GPS/Compass module compared to the APM2.5/6.

Hello TCIII - I am using the MP 1.2.67 mav 1.0
Firmware is 3.0.1 quad

Regarding the upside down compass in the GPS+Compass module - I wasn’t aware of it but the module has been installed correctly by me - i.e. curved surface on top with FRONT Arrow on top and oriented to match the fore aft axis of the quad.

In the MP compass page of Mandatory hardware, the compass enable and auto declination boxes were already checked and I selected the external compass before doing doing the live calibration (all values between -150 and +150). Moment the external compass radio button is clicked the ROTATION_ROLL_180 option is automatically selected in the drop down list - i guess this caters for the upside down compass in the external module.

I did the compass test from the Terminal CLI. Twice the Compass Failed to Initialize. I redid the compass calibration successfully and the offset values are -70, -17 and -25. However the hdg is still incorrect. Sometimes at bootup it indicates North (irrespective of quadcopter orientation) and sometimes at bootup it indicates a random hdg. Also, occasionally the hdg responds to changes in quadcopter hdg and on occasion it responds initially and then slews back to the random direction.

Is there any way to test the compass to know if its ok or broken. BTW I did a pin to pin continuity check of the compass cable - it was good.

You should have the combination GPS/Compass module mounted with the GPS antenna on the top and the compass underneath the GPS module facing downwards if you want the GPS to be able to obtain the maximum sat signals: … ss-module/
You might want to update the MP to 1.7.72.

Thanks TCIII

I do have my GPS+Magnetometer unit mounted correctly. I will update my MP to 1.7.72 and then try it out. I hope it will solve the problem - but I don’t feel very confident.

I was wondering if I should try out the following to eliminate the possibility that I have received a unit with hardware problems:-

I have a APM clone board (RC TImer) with built in magnetometer. I could load the same firmware on this board i.e. ver 3.0.1 and connect my GPS+Magnetometer unit to it and try it out. My question is when I select the external compass will the built in compass on the board be disabled? The aim is to try and determine if 3DR has shipped me a bad APM board or Bad extrernal compass module. Also, is there anyone in 3DR that I could take this up with? I am beginning to feel that I have received a defective hardware.

If the clone board is an APM2.5, you will have to figure out a way to disable the onboard compass to be able to use the compass on the GPS/compass module. If the clone board has the same circuit layout around the onboard compass, there should be a trace to cut on the clone to disable the compass.

I did upgrade to MP 1.2.73 and had no joy.

I finally figured it out myself and here is my reasoning - there may be some flaws but overall I guess its correct.

I got my initial clue when I did a test on my clone (RC Timer) board. I disabled the onboard compass and powered it up and found that hdg always initialized to north on power up and thereafter relative hdg was indicated presumably by angular (yaw) rate integration.

Thereafter, I went back to my APM 2.6 board and did a compass test in CLI and found that compass initialization was consistently failing (till yesterday it was intermittently failing). I concluded that there could be two reasons - first the external compass was defective or second the APM 2.6 board was delivered with an onboard compass even though the 3DR info on APM 2.6 claims that the board is delivered without the onboard compass. I opened the APM 2.6 unit and discovered that it indeed has an onboard magnetometer and the problem was finally cured by simply disconnecting the external compass cable (looks like when the external compass was connected the two compasses conflicted and apparently there was no magnetic hgd source thereafter - thus the hdg was initialized to north).

At the end it looks like I paid 3DR extra for nothing - not to mention three full evenings dedicated to figuring this out.

I there anyone from 3DR who would like to respond?

Are you absolutely sure that your APM is a 2.6 and not a 2.5? You did purchase it from 3D Robotics?

Absolutely dead sure I purchased an APM 2.6 - nevertheless I double checked and reconfirmed that I purchased an APM2.6 indeed (order # R410008644)

Now with only the external GPS connected and the external magnetometer cable removed the APM is behaving correctly and I am getting true hdg display in the MP

Now I need to figure out how to disable the onboard magnetometer so that the external one can be used - I seriously doubt that there is a software solution to this and I wouldn’t like to mess with the hardware.

Looks like I paid a lot for nothing. BTW I had an APM ver 1 which simply flew away one day when I engaged GPS hold and I lost it - I must have done GPS position hold so many times and was so familiar with the hardware - could never explain it. Thereafter I bought the APM 2.5 clone from RC Timer as a cheap solution - I got thoroughly fed up as I couldn’t upgrade the PPM encoder as it has the boot loader is missing - the quadcopter continually twitches in fight. Finally I paid $240 and bought the APM 2.6 and now I have this problem - will my woes ever end?

Here are the wiki instructions to disable the onboard compass: … rformance/
Make sure the pwb is the same as the one in the picture which is a 2.5. I suspect that you really have a 2.5 since the compass is onboard. I have modified two APM2.5s following the wiki instructions and both external compasses worked the first time.

Thanks TCIII - the instructions are pretty clear. I need to just cut one solder bridge i.e. the SDA line. Will attempt it.

I understand the only difference between APM 2.5 and 2.6 is that the 2.5 has and onboard compass while the 2.6 doesn’t have it.

Is there any other differences between the APM 2.5 and 2.6?


I believe that the APM2.6’s lack of an onboard compass is the only real difference.

I am also an owner of an APM 2.6 from 3D robotics… and it has an on board compass… I’ve calibrated it and it works fine pointing true north when I point it north, West when pointed west…etc., etc., Maybe because there was an easy on-board facility for disconnecting the on-board compass that it was thought there was no on-board compass? I feel/ think that a flight controller would not be complete without a compass, on-board. Losing this option arbitrarily seems like a step backward to me. All the flight controllers aren’t mounted in the middle of a magnetic flux storm, after all. Just my observations regarding a great product and community.