Internal and external compasses show different sensitivity

Hello everyone,
we are having a weird problem with a Bormatec Ninox plane, who crashed violently in AUTO mode (Plane crashed vertically at top speed during a mission in auto mode) and I suspect it is due to a compass issue, because the “compass variance” error is the only clue I have. It flies perfectly in FbwA mode, but in AUTO mode it does not follow the expected path and always end crashing into the ground for no apparent reason, with the “compass variance” error on the HUD and the compass kalman filter indicator in red.

The thing is that we are using the external compass of a Ublox M8N Neo GPS, and the internal one of a Hobbyking Pixhawk lite 32. The GPs have a HMC5883 compass chip, while the Pixhawk have a LSM303 chip. After calibration of offsets, both compasses show the same trend and the magnitude of the magnetic field behave as expected according to http://ardupilot.org/copter/docs/common-compass-setup-advanced.html#common-compass-setup-advanced (magz always positive, magx increase when pitching down, magy increase when rolling to the right). HOWEVER, apart from the offset between the compasses, the magnitude of one of the compass is different from the other, it is like a different sensitvity in the volts/miligauss parameter of each chip.

I understand that with two compasses, the primary is the external one and only that one is used for navigation. Still, we have changed COMPASS_USE2 to 0 trying not to use the internal compass and get rid of the “compass variance”, with no success. I have tried with another unit of the same pixhawk lite autopilot, and another (identical) gps , so I am ruling out hardware failure.

In another thread someone has suggested looking for the devices ID of the compasses, ours are:
COMPASS_DEV_ID,73225
COMPASS_DEV_ID2,131594

So my questions are:

Could it be this different sensitivity the reason for the “compass variance” error and for the poor navigation? maybe the chip in the pixhawk LITE is a non standard one.

How can I confirm that the external compass is the primary one looking at the devices_ids?

Why is that the “compass variance” error still persist if I don’t use the secondary compass?

Any help with this issue will be much appreciated, we are running out of ideas to fix this problem (apart from trhowing away all the hardware, of course :frowning: )
Thanks in advance and regards,
Adolfo.