#search: magnetometer calibrate
releated tools
MagCal
a software tool developed by the Position, Location And Navigation Group (PLAN) at the University of Calgary
Magneto looks for the ellipsoid that best fits the magnetometer raw measurements
https://chionophilous.wordpress.com/2012/09/01/implementing-the-gauss-newton-algorithm-for-sphere-fitting-1-of-3/
http://sailboatinstruments.blogspot.com/2011/08/improved-magnetometer-calibration.html
https://sites.google.com/site/sailboatinstruments1/c-language-implementation
https://www.researchgate.net/publication/4070857_Least_squares_ellipsoid_specific_fitting
http://www.varesano.net/blog/fabio/freeimu-magnetometer-and-accelerometer-calibration-gui-alpha-version-out
https://github.com/kriswiner/MPU6050/wiki/Simple-and-Effective-Magnetometer-Calibration