We present a novel method to determine the motion of the slider's flying height and off-track direction simultaneously in a hard disk drive. The results show the relative movement of the slider in two dimensions, both during thermal actuator controlled contact and full flying condition. The method separates the position error signal (PES) and the flying height signal from the readback signal. The method includes writing dual-frequency pattern tracks adjacently, with the readback signals from the tracks filtered for the in situ motion measurement. The harmonic ratio method is used to determine the flying height variation of the head, whereas the conventional servo burst detection method is used to determine the PES.