Corrected bug when updating the magnetometer calibration and not using gps heading