Narrative:

I was flying a piper warrior from bhm to eky. The directional gyro was set before takeoff. After takeoff, a 090 degree heading was assigned. After a min or two, departure questioned whether I was on a 090 degree heading. I replied I was very close, as I was within 5 degrees. ATC then said that they needed me on a 090 degree heading to avoid traffic. I replied my understanding, and then noticed my directional gyro was off. The magnetic compass was showing approximately 115 degrees. I aligned the directional gyro to the compass and then corrected my heading with a turn to the left.

Google
 

Original NASA ASRS Text

Title: A PRECESSING GYRO CAUSES A TRACK DEV AFTER TKOF FROM BHM, AL, THAT IS DETECTED AND CORRECTED BY ATC.

Narrative: I WAS FLYING A PIPER WARRIOR FROM BHM TO EKY. THE DIRECTIONAL GYRO WAS SET BEFORE TKOF. AFTER TKOF, A 090 DEG HDG WAS ASSIGNED. AFTER A MIN OR TWO, DEP QUESTIONED WHETHER I WAS ON A 090 DEG HDG. I REPLIED I WAS VERY CLOSE, AS I WAS WITHIN 5 DEGS. ATC THEN SAID THAT THEY NEEDED ME ON A 090 DEG HDG TO AVOID TFC. I REPLIED MY UNDERSTANDING, AND THEN NOTICED MY DIRECTIONAL GYRO WAS OFF. THE MAGNETIC COMPASS WAS SHOWING APPROX 115 DEGS. I ALIGNED THE DIRECTIONAL GYRO TO THE COMPASS AND THEN CORRECTED MY HDG WITH A TURN TO THE L.

Data retrieved from NASA's ASRS site as of July 2007 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.