calibration of the magnetometer