Hello, I want to use an external magnetometer in my project, how can I calibration my external magnetometer sensor? Please explanation a method or offer me, I want to using attitude from openimu300zi and use an external magnetometer sensor .

Your method for calibration magnetometer is only rotate in z axis for 1 or 2 minutes and final output is coefficients of hard and soft iron , and it seems that your transformation matrix is a matrix 2x2, is it right? If so , please explanation how to calculate coefficients and bias vector?

In this figure, the magnetometer sensor rotate in x,y,z axis and It has a 3x3 transformation matrix and 3 bias ...

Best regards

Amin