# Magnetometer calibration not showing for external mag

**URL:** <https://discuss.px4.io/t/magnetometer-calibration-not-showing-for-external-mag/13727>\
**Category:** PX4 Autopilot\
**Created:** [November 5, 2019, 6:11pm UTC](https://discuss.px4.io/t/magnetometer-calibration-not-showing-for-external-mag/13727 "2019-11-05T18:11:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bunborn](https://discuss.px4.io/user_avatar/discuss.px4.io/bunborn/32/5035_2.png) [@Bunborn](https://discuss.px4.io/u/Bunborn)\
**Post date:** [November 5, 2019, 6:11pm UTC](https://discuss.px4.io/t/magnetometer-calibration-not-showing-for-external-mag/13727/1 "2019-11-05T18:11:07Z")

</div>

I’m using a pixhawk 4 with px4 v1.9.2 and a Zubax GNSS 2 over UAVCAN. I’ve tried doing the calibration a dozen times in different settings, I re-flashed the pixhawk, changed settings now on the Zubax to no affect. The calibration finishes but the scaling / offsets parameters never fill out for the external compass. The GPS itself works no problem and can accurately get location and connect to satellites.

 ![calMag](https://discuss.px4.io/uploads/default/original/2X/c/c77f1b321a1faffffc4e26f8351a6b1916138ed3.png)

Any ideas? Or even ways of just disabling this second external compass so my quad is not grounded?

---

<div class="post-metadata">

**Author:** ![hamishwillee](https://discuss.px4.io/user_avatar/discuss.px4.io/hamishwillee/32/3469_2.png) [@hamishwillee](https://discuss.px4.io/u/hamishwillee)\
**Post date:** [November 5, 2019, 9:21pm UTC](https://discuss.px4.io/t/magnetometer-calibration-not-showing-for-external-mag/13727/2 "2019-11-05T21:21:48Z")

</div>

Don’t know about why scaling might not work, but you can disable compasses using [CAL\_MAGn\_EN](http://docs.px4.io/master/en/advanced_config/parameter_reference.html#CAL_MAG2_EN).

---

<div class="post-metadata">

**Author:** ![JulianOes](https://discuss.px4.io/user_avatar/discuss.px4.io/julianoes/32/30_2.png) [@JulianOes](https://discuss.px4.io/u/JulianOes)\
**Post date:** [November 6, 2019, 8:40am UTC](https://discuss.px4.io/t/magnetometer-calibration-not-showing-for-external-mag/13727/3 "2019-11-06T08:40:03Z")

</div>

So, how many mags do you have? It shows 3 internal mags, is that right?

And can you also show the output of `listener sensor_mag`?

---

<div class="post-metadata">

**Author:** ![Bunborn](https://discuss.px4.io/user_avatar/discuss.px4.io/bunborn/32/5035_2.png) [@Bunborn](https://discuss.px4.io/u/Bunborn)\
**Post date:** [November 6, 2019, 5:39pm UTC](https://discuss.px4.io/t/magnetometer-calibration-not-showing-for-external-mag/13727/4 "2019-11-06T17:39:27Z")

</div>

It should just be two (one internal and one external). The Pixhawk 4 compass and the compass onboard the GPS (Zubax GNSS 2).

Just for clairty sake, I changed the primary mag back to what it defaulted to (setting MAG1 as MAG\_PRIME)

 ![image](https://discuss.px4.io/uploads/default/original/2X/4/46262bd9a45a34e05e60ad0c7bdbbf2faf40cfa9.png)

Here is the output for listener sensor\_mag

![image](https://discuss.px4.io/uploads/default/original/2X/c/c42dc4ad0fb58ee7adb44e48cfd5c87026203823.png)

So not sure why these other mag’s are showing up but with limited parameters? Or why the gps compass isn’t appearing. It was a couple weeks ago but I swear when I tried these commands in the past it did show a second compass. I have 3 GPS modules so I am trying another one but have the same result.

---

<div class="post-metadata">

**Author:** ![Bunborn](https://discuss.px4.io/user_avatar/discuss.px4.io/bunborn/32/5035_2.png) [@Bunborn](https://discuss.px4.io/u/Bunborn)\
**Post date:** [November 6, 2019, 6:07pm UTC](https://discuss.px4.io/t/magnetometer-calibration-not-showing-for-external-mag/13727/5 "2019-11-06T18:07:34Z")

</div>

Here is the mag’s - still showing 3 internal ones - after I changed to a new GPS module.

 ![image](https://discuss.px4.io/uploads/default/original/2X/2/281f0d9394487af9e7d8deadac878dc859038816.png)

Note that the external mag/gps is connected over UAVCAN so I changed that parameter. GPS reading itself is still good.

 ![image](https://discuss.px4.io/uploads/default/original/2X/7/7708e26e15ae80f3e7d90738b3a35e377e2c1b8f.png)

If I unplug the GPS while it is on I get a MAG1 failure notice in Qgroundcontrol.

 ![image](https://discuss.px4.io/uploads/default/original/2X/d/d2f5f43477f3b2b01056923dd69f75fddb3baf4c.png)

---

<div class="post-metadata">

**Author:** ![Bunborn](https://discuss.px4.io/user_avatar/discuss.px4.io/bunborn/32/5035_2.png) [@Bunborn](https://discuss.px4.io/u/Bunborn)\
**Post date:** [November 6, 2019, 7:16pm UTC](https://discuss.px4.io/t/magnetometer-calibration-not-showing-for-external-mag/13727/6 "2019-11-06T19:16:34Z")

</div>

Sorry for posting a slew of updates, I also tried it with a completely new pixhawk 4 on 1.9.2 stable connected to a new zubax gnss 2 with the same results. The mag1 parameters **not** showing up after calibration.

If I unplug the gps and do calibration, it will then not arm when gps back plugged in as ‘mag 1 is uncalibrated’. (re-calibrating then adds in the phantom mag id and mag1 rot to no rotation)

I feel like a lost dog. I have a log file of me just moving the quad around for the ‘IMU’ and ‘IMU2’ (IMU2 just never moves from zero but IMU works normally). I can upload it but not sure how on here

---

<div class="post-metadata">

**Author:** ![JulianOes](https://discuss.px4.io/user_avatar/discuss.px4.io/julianoes/32/30_2.png) [@JulianOes](https://discuss.px4.io/u/JulianOes)\
**Post date:** [November 7, 2019, 2:48pm UTC](https://discuss.px4.io/t/magnetometer-calibration-not-showing-for-external-mag/13727/7 "2019-11-07T14:48:27Z")

</div>

Can you try with latest beta/v1.10 and see if it’s any better? And also check `listener sensor_mag` there again.

---

<div class="post-metadata">

**Author:** ![Bunborn](https://discuss.px4.io/user_avatar/discuss.px4.io/bunborn/32/5035_2.png) [@Bunborn](https://discuss.px4.io/u/Bunborn)\
**Post date:** [November 7, 2019, 6:18pm UTC](https://discuss.px4.io/t/magnetometer-calibration-not-showing-for-external-mag/13727/8 "2019-11-07T18:18:58Z")

</div>

In the latest beta (4) on 1.1.0 `listener sensor_mag` does show both mags !

 ![image](https://discuss.px4.io/uploads/default/original/2X/2/2f188fb54ef9c1ec7accea6cb4856c0d1f624e9e.png)

However **after I then recalibrated** it now SOMETIMES seems to show only the external mag for `listener sensor_mag`

![image](https://discuss.px4.io/uploads/default/original/2X/7/7468b22e2a6325bca1a1de271fe73c53853234c0.png)

 ![image](https://discuss.px4.io/uploads/default/original/2X/f/f0ba7fbb78b2a4ee41be825e4c2dd39908a21be3.png)

But after I rebooted it again it showed both

 ![image](https://discuss.px4.io/uploads/default/original/2X/8/860a87e7d55e7a7807286d0e9de9e51c28d6fe20.png)

Finally, thanks so much for the help thus far. It does allow me to arm ! I’m very thankful

However any chance do you know what commits / code changes might be related to this? I want to modify px4 a bit myself but would prefer not to build off a beta branch 🙂

Thanks!

---

<div class="post-metadata">

**Author:** ![JulianOes](https://discuss.px4.io/user_avatar/discuss.px4.io/julianoes/32/30_2.png) [@JulianOes](https://discuss.px4.io/u/JulianOes)\
**Post date:** [November 8, 2019, 2:19pm UTC](https://discuss.px4.io/t/magnetometer-calibration-not-showing-for-external-mag/13727/9 "2019-11-08T14:19:13Z")

</div>

> [@Bunborn](#):
>
> However any chance do you know what commits / code changes might be related to this?

That’s hard to say. I would check what changes have gone into the respective driver that you’re using but also into bugfixes for the `listener` command. It might be both.

---

<div class="post-metadata">

**Author:** ![Abdulsamet\_TUTUNCU](https://discuss.px4.io/user_avatar/discuss.px4.io/abdulsamet_tutuncu/32/7634_2.png) [@Abdulsamet\_TUTUNCU](https://discuss.px4.io/u/Abdulsamet_TUTUNCU)\
**Post date:** [March 28, 2021, 8:55pm UTC](https://discuss.px4.io/t/magnetometer-calibration-not-showing-for-external-mag/13727/10 "2021-03-28T20:55:50Z")

</div>

Hi!  
I have HERE3, Pixhawk Cube Orange and I connected Here 3 with can1 port. Altough I cant see external compass. What should I do to use external compass?  
That topic is why I want to use external compass: [If I give higher thr 2 motors are spin slowly and stop issue - #2 by Retro-meb](https://discuss.px4.io/t/if-i-give-higher-thr-2-motors-are-spin-slowly-and-stop-issue/21670/2)

 ![Screenshot from 2021-03-28 23-54-00](https://discuss.px4.io/uploads/default/original/2X/1/17c1c3240c915c99b1e3f52dc7669d87f4e042b7.png)
