Mag scaling coef issues on px4


I have had my quadcopter grounded due to the zubax gnss 2. I’m running a pixhawk 4 with px4 v1.9.2 and it will never let me arm the quadcopter because of a magnetometer calibration issue.

On the Zubax help page it says

Don’t forget to perform compass calibration when done. If the autopilot reports issues with high magnetic field offsets, set the parameter mag.scaling_coef on Zubax GNSS to approximately 0.6 and try calibration again

However, I don’t understand exactly what it wants me to change. I first thought it meant over the USB interface but you don’t seem to be able to change parameters. Does it want me to change part of the code in this file (github)? And why are there 3 parameters, should I just change the first one of 1.0F to 0.6F then?

I’ve been stuck on this forever and this gps is killing me now. Any help would be appreciated.


You can change configuration parameters using the UAVCAN GUI Tool over UAVCAN, or using the command-line interface over USB. In the latter case, the command is cfg set mag.scaling_coef 0.6.

Thanks for the help! Unfortunately it still is giving me mag calibration issues. I suspect it may be that the PX4 software can’t set some parameters with a UAVCAN sensor. Do you know which version of px4 was used to validate the gnss 2 in the past?

Also to clarify, the GPS itself works fine with connecting to satelites

It seems to be a px4 issue or something still with uavcan, but was able to get it to be seen in the beta 4 1.1.0 of px4 :slight_smile:

Try increasing the compass error tolerance by cheng COM_ARM_MAG from 0,05 to 0,15 or higher to 0,5. In other case desable internal mags.

1 Like