Magnetometer calibration not showing for external mag

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.

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

Don’t know about why scaling might not work, but you can disable compasses using CAL_MAGn_EN.

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?

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)

Here is the output for listener sensor_mag

image

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.

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

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

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

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

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

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

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

image

But after I rebooted it again it showed both

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 :slight_smile:

Thanks!

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.