A magnetic disk device includes a position and velocity demodulating
circuit. In the position and velocity demodulating circuit, a difference
calculating unit demodulates a moving velocity of a magnetic head based
on a phase difference in servo signals as servo data in the same sector.
An overflow detecting unit detects an overflow of the demodulated moving
velocity and calculates a correction value for the overflow. The overflow
is corrected based on the correction value. The corrected overflow is
further corrected by a correction value of a repeatable velocity error
for the demodulated velocity to output an accurate demodulated velocity.