A method for determining a flying height of a head of a hard disk drive.
The disk drive includes a pre-amplifier and an automatic gain control
("AGC") circuit that are connected to the head. The method includes
determining a first automatic gain control value based on AGC values at
two delta pre-amplifier gain settings. A second automatic gain control
value is determined based on AGC values at two different flying heights.
A difference between the flying heights can be determined from the first
and second automatic gain control values. If one of the flying heights is
set to 0 the difference in gain values is equal to the flying height of
the head.