Magnometer driving me insane

How, exactly, did you do the magnetometer calibration, and where are the results applied?

If you are working with the raw data, there should be an offset and scale factor for each axis. This offline approach to calibration is superior: http://sailboatinstruments.blogspot.com … ation.html

Incidentally, this package seems to be state of the art for open source AHRS software, and works with the ALTIMU-10 https://github.com/richards-tech/RTIMULib