Date: 201503
Location: ZDC.ARTCC, VA
Flight conditions: VMC
Aircraft: B737-700
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Mission: Passenger
Flight phase: Climb
Airspace: Class A ZDC
ATC / advisory: Center ZDC
Aircraft component: MCP
Component problem: Improperly Operated
Reporter organization: Air Carrier
Reporter function: Captain; Pilot Not Flying
Reporter qualification: Flight Crew Air Transport Pilot (ATP)
Human factors: Confusion
Second reporter function: First Officer; Pilot Flying
Anomaly: Deviation - Track / Heading All Types; Deviation / Discrepancy - Procedural Clearance; Deviation / Discrepancy - Procedural Published Material / Policy
Detector: Person Air Traffic Control; Person Flight Crew
When detected: In-flight
Result: Air Traffic Control Issued Advisory / Alert; Air Traffic Control Issued New Clearance; Flight Crew Became Reoriented; Flight Crew Returned To Clearance
Contributing factors: Human Factors; Aircraft
Primary problem: Human Factors

Narrative: During climbout on the TERPZ departure and cleared to FL230; we received instructions from Potomac Departure to expedite climb thru FL180 climb to FL230. I observed First Officer (FO) change from VNAV PATH to V/S Mode and increase V/S to comply with climb instruction. Over TERPZ passing 16;000 Feet First Officer/Pilot Flying (PF) stated it didn't turn. Autopilot was engaged. First Officer/PF selected HDG Select on MCP and initiated a 30 degree banked turn over TERPZ to LITME; the next waypoint. During the turn; Controller asked what departure we were on and I/Pilot Monitoring (PM) responded TERPZ; we're late on the turn. Controller responded with a fly heading 220 degrees; which we did. As we completed the turn; the Controller cleared us direct RAMAY. At no time was the autopilot disengaged or revert to Control Wheel Steering (CWS) Roll mode. The aircraft failed to follow magenta line at TERPZ. The departure was briefed and crosschecked and was correct and included all waypoints with no discontinuities. The error resulted in a turn over TERPZ; which put us 1 1/2 to 2 NM west of the magenta line. Remainder of the flight was uneventful and LNAV worked normally.An MEL for DME was current. That MEL required DME updating to be turned off; which I performed and we concurred with each other during preflight. I am uncertain whether this contributed to the event.


Second narrative: After takeoff; Aircraft (A/C) was climbing in LNAV/VNAV on the TERPZ4. Prior to WONCE the A/C was cleared direct TERPZ. Pilot Flying (PF) executed Pilot Monitoring (PM) confirmed. Aircraft was above 10;000 Feet and it pitched down to accelerate to climb speed since the WONCE 250 knot restriction was overwritten. Climb speed of approximately 327 knots was commanded by the FMC. This would put the climb speed too close to the Barber Pole; so I adjusted climb speed to 320 knots and executed; PM confirmed.Shortly after; ATC commanded that we expedite climb through FL180. The A/C was at that time accelerating through 290kts. I then selected LVL CHNG on the MCP and dialed the speed down to 250 kts to comply with ATC. The A/C then pitched back up and climbed rapidly. At this point; the A/C was approaching TERPZ. I looked down within .5 NM of TERPZ and noticed the aircraft was flying straight through the turn point at TERPZ. The turn should have commenced approximately 1.5 NM prior to the point (not a flyover point) to properly intercept the outbound track from TERPZ. I immediately turned the heading knob and selected heading and notified the PM. I said something like; 'The plane didn't turn at TERPZ going to heading.' The A/C was through approximately 70 degrees of left turn when ATC asked us where we were going. Then Potomac told us we missed the turn at TERPZ 'fly heading 220.' At that time we were heading approximately 190 degrees on an intercept back to course (approximately 1.5-2.0 miles off course). I set heading 220 and the A/C turned right on heading. ATC then queried if we were on the TERPZ Departure; which the PM answered in the affirmative. Shortly thereafter; we were cleared direct RAMAY on course. I selected RAMAY; executed; and selected LNAV. PF/PM verified LNAV and we continued on course with the rest of the flight accomplished uneventfully.I did not check the lateral navigation mode prior to manually spinning the heading to the left and turning the A/C to re-intercept the LNAV course in HDG mode. However; the A/C was tracking the magenta line to TERPZ and the Flight Director was present indicating a wings level climb (so a lateral navigation mode must have been selected since we weren't in CMD ROLL mode). I believe that I must have hit the HDG mode button inadvertently when I was trying to comply with the ATC command to expedite my climb through FL180 (spinning commanded airspeed and selecting LVL CHNG). The commanded heading was perfectly aligned to maintain my course to TERPZ. As a matter of habit; I usually align the heading bug with the heading pointer even when in LNAV.


Synopsis: B-737 flight crew reports a late turn at TERPZ during the TERPZ4 departure after being instructed by ATC to expedite climb through FL180. The First Officer surmised that the heading mode was inadvertently selected while making inputs on the MCP to comply with the ATC clearance.