Patent ID: 8917469

Claim:
A disk drive comprising: a disk comprising a plurality of tracks defined by a plurality of servo sectors; a head actuated over the disk; and control circuitry operable to: generate an estimated track ID representing an estimated radial location of the head; generate a plurality of proximate track IDs having values proximate the estimated track ID; generate a set of Gray codes each corresponding to the estimated track ID and the proximate track IDs, wherein each Gray code in the set of Gray codes comprises N bits, and M bits out of a high order of the N bits comprise the same value; detect a Gray code in a first servo sector to generate a detected Gray code; and correct an error in the detected Gray code by inverting at least one bit in the detected Gray code comprising a value that is different from the value of the corresponding bit in the M bits, wherein: the plurality of proximate track IDs extend from a −L proximate track ID preceding the estimated track ID to a +L proximate track ID following the estimated track ID; L is an integer greater than one; and the control circuitry is further operable to determine the M bits by comparing only the Gray code representing the −L proximate track ID to the Gray code representing the +L proximate track ID.