A system for calibrating an electronic compass for a vehicle of the type
employing a Forward and Lateral magnetoresistive magnetic field sensor. As
the vehicle changes headings, the system periodically samples and
digitally stores the peaks of the sensor outputs. When the stored peaks
indicate a minimum change in the output of the sensors, the system
microcomputer calculates a "box" surrounding the subscribed arc of heading
changes and computes the center of the "box" as the center of the locus of
anticipated peaks for all quadrants and shifts the locus (i.e., "box") to
be within the domain of the A/D converter to prevent saturation, which
could otherwise occur in the presence of strong remnant magnetic fields in
the vehicle. The "box" is updated with each sampling of sensor outputs
until the vehicle is eventually headed through all four cardinal compass
headings, and the compass is then considered to be fully modeled in the
microcomputer.