Add compass calibration code