The heading indicator is a flight instrument used in an aircraft to inform the pilot of the aircraft's heading. It is sometimes referred to by its older names, the directional gyro or DG, and also direction indicator or DI.
The primary means of establishing the heading in most small aircraft is the magnetic compass, which, however, suffers from several types of errors, including that created by the "dip" or downward slope of the Earth's magnetic field. Dip error causes the magnetic compass to read incorrectly whenever the aircraft is in a bank, or during acceleration, making it difficult to use in any flight condition other than perfectly straight and level. To remedy this, the pilot will typically maneuver the airplane with reference to the heading indicator, as the gyroscopic heading indicator is unaffected by dip and acceleration errors. The pilot will periodically reset the heading indicator to the heading shown on the magnetic compass.
The heading indicator works using a gyroscope, tied by an erection mechanism to the aircraft horizontal, i. e. the plane defined by the longitudinal and the lateral axis of the aircraft. As such, any configuration of the aircraft horizontal that does not match the local Earth horizontal results in a gimbal error, essentially leading to a variation in the predictable "apparent" wander, known in this instance as drift. The heading indicator is arranged so that only the horizontal axis is used to drive the display, which consists of a circular compass card calibrated in degrees. The gyroscope is spun either electrically, or using filtered air from a vacuum pump (sometimes a pressure pump in high altitude aircraft) driven from the aircraft's engine. Because the Earth rotates (ω, 15° per hour), and because of small accumulated errors caused by friction and imperfect balancing of the gyro, the heading indicator will drift over time, and must be reset from the compass periodically.The apparent drift is predicted by ω sin Latitude and will thus be greatest over the poles. Another sort of apparent drift exist in the form of transport wander, where aircraft movement will essentially add or subtract to the effect of the Earth's rotation upon a gyroscope. To counter for the effect of Earth rate drift a latitude nut can be set (on the ground only) which induces a (hopefully equal and opposite) real wander in the gyroscope. Normal procedure is to realign the direction indicator once each ten to fifteen minutes during routine in-flight checks. Failure to do this is a common source of navigation errors among new pilots.