Automatic Day-Night Mirror Description and Operation: Compass
WARNING: This page is about a different car, the 2007 Hummer H2. However, it is still accessible from the selected car via links, so may be relevant.
The mirror uses 2 magnetic field sensors for compass direction. One sensor is for north and south, the other is for east and west. The mirror supplies a signal and low reference to each sensor. As the vehicle travels with or against the earths magnetic pull, there will be a change in voltage on one or both sensors. As a result of the change in voltage, the mirror changes the heading on the compass display.