automatic mag calibration