An electronic compass system includes a magnetic sensor circuit having at
least two sensing elements for sensing perpendicular components of the
Earth's magnetic field vector. A processing circuit is coupled to the
sensor circuit to filter, process, and compute a heading. The processing
circuit may determine whether too much noise is present in the output
signals received from said magnetic sensor circuit as a function of the
relative strength of the Earth's magnetic field vector. The magnetic
sensor circuit may include three magnetic field sensing elements
contained in a common integrated package having a plurality of leads
extending therefrom for mounting to a circuit board. The sensing elements
need not be perpendicular to each other or parallel or perpendicular with
the circuit board. The electronic compass system is particularly well
suited for implementation in a vehicle rearview mirror assembly.