Light Transport
Flight Crew Instrument; Flight Crew Multiengine; Flight Crew Air Transport Pilot (ATP)
Situational Awareness
Deviation - Track / Heading All Types; Deviation / Discrepancy - Procedural Clearance; Deviation / Discrepancy - Procedural Published Material / Policy
Air Traffic Control Issued New Clearance; Flight Crew Returned To Clearance
Environment - Non Weather Related; Human Factors; Procedure
Prior to departure off of Runway XX we briefed the ZZZZZ X departure. Upon departure we flew the assigned heading in the SID and met the crossing restriction. Approach then gave us a climb to FL190. In the climb the FD Mode Off annunciator came on. We then turned direct to ZZZZZ1. Within a few seconds ATC queried us and asked where we were going. He told us to turn back to our originally assigned heading from the SID. We continued on uneventfully. I think several things came into play today. It was a swapped crew in the middle of my day. We haven't been flying very much in the past three months; I didn't sleep very well the night prior due to noisy rooms next door. And finally we were too hasty in responding to the FD mode annunciator; which should have been in HDG for this departure.
After having briefed the ZZZZZ X ZZZ1 departure on the ground; on departure we were given an amended climb unrestricted to 190. At about that time the FMS; upon reaching the end of the departure nav fixes; gave us the FD mode amber warning; I referenced my transcribed clearance from our paperwork and I mistakenly got us moving direct to the next fix ZZZZZ1 listed after ZZZ1 instead of maintaining the runway heading as we had briefed. ATC issued a lower level off of 120 and asked where we were going; we read back to the above fix and we were corrected and admonished to maintain the runway heading per the chart.Suggestions: The usual; slow down; make sure everyone is on the same page; if in question inquire. There is some rust from the minimal frequency of flying; and my personal expectations of How fast we can move things along needs to be revisited.
Flight crew reported not flying the assigned heading on departure and being corrected by ATC. The crew referenced lack of flying as a contributing factor.