An amplitude measurement unit measures an amplitude of a read signal from
a preamble unit in a servo area of a predetermined frame number m per one
rotation of the recording medium for a predetermined cycle number n while
increasing an electric power amount distributed to the heater in the
state in which the head is positioned to a track on the recording medium,
and a mean amplitude calculating unit calculates a mean amplitude from an
amplitude measurement value which is measured by the number which is the
frame number m multiplied by the cycle number n. A contact determination
unit calculates a mean amplitude variation amount per a unit heater
electric power amount as a contact determination value, and determines
that the head is in contact with the recording medium when the contact
determination value is lower than a predetermined threshold value, and a
flying height calculating unit which calculates a flying height of the
head with respect to the surface of the recording medium from the heater
electric power amount at the point when contact is determined.