Narrative:

We departed the gate late because of the airplane having a maintenance write up on the compass system. Maintenance did replace a part in the gyro compass system and signed off the logbook. During taxi out; all gyro compass indications looked normal. After take off and climbing through about 16;000 ft the heading annunciator on both fmas illuminated; the flight director failed; and the autopilot tripped off. During this time we went through assigned altitude of 25;000 ft by about 200 ft. We advised ATC that we were returning to the departure airport. At times there was a 40 degree split between the two compass systems. Because of the heading issues; we declared an emergency and landed with out incident. This event was caused due to the gyro compass system failure.

Google
 

Original NASA ASRS Text

Title: A MD82 crew discovered after the FMA annunciated HEADING that the compass headings were up 40 degrees different; so an emergency was declared and the flight returned to the departure airport where maintenance on the compass had previously been performed.

Narrative: We departed the gate late because of the airplane having a maintenance write up on the compass system. Maintenance did replace a part in the gyro compass system and signed off the logbook. During taxi out; all gyro compass indications looked normal. After take off and climbing through about 16;000 FT the heading annunciator on both FMAs illuminated; the Flight Director failed; and the autopilot tripped off. During this time we went through assigned altitude of 25;000 FT by about 200 FT. We advised ATC that we were returning to the departure airport. At times there was a 40 degree split between the two compass systems. Because of the heading issues; we declared an emergency and landed with out incident. This event was caused due to the gyro compass system failure.

Data retrieved from NASA's ASRS site as of July 2013 and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.