The compass system of the present invention utilizes an improved
calibration routine in which a processing circuit of the compass
recalibrates the compass each time three data points are obtained from a
magnetic field sensor that meet predetermined criteria. One such
criterion is that the three data points define corners of a triangle that
is substantially non-obtuse. When three data points have been obtained
that define a triangle meeting this criterion, the processing circuit
calculates a center point for a circle upon which all three data points
lie by solving the equation x.sup.2+y.sup.2+Ax+By+C=0 for A, B, and C,
using the coordinate values (x,y) for the three data points and defining
the center point as (-A/2, -B/2).