An example method for controlling an electronic compass includes determining compass tracking angles in a coordinate system for magnetic field data points that correspond to magnetic field sensor signals produced as a vehicle rotates relative to a surrounding magnetic field. The magnetic field data points produce an expected curve in the coordinate system. The rotation of the vehicle is tracked relative to the surrounding magnetic field based upon the compass tracking angles and whether the vehicle has rotated a desired amount is determined based at least partially upon the expected curve and the compass tracking angles.