The thermal flying height (FH) control technology had been applied to adjust FH in hard disk drive (HDD) during read/write processes. The readback signal-based in-situ FH testing technology is the feasible way to monitor and control the FH of heads in HDD. For perpendicular recording, the soft magnetic underlayer has the effects on readback signal and change the Wallace equation into a hyperbolic formula with no explicit solution to the spacing change versus the signal amplitude. Fortunately, the hyperbolic formula can be reduced to the traditional Wallace spacing loss equation at short wavelength. In the actual application, there is a need to compare the FH change or modulation at different disk locations and the harmonic ratio method is preferred to cancel media magnetic fluctuations and a certain level of off-track. This work proposed a new code pattern (11110000) to generate three major harmonic signals: the first, the third, and the fourth harmonics. With zero of the second harmonic signal, the harmonic energies are able to concentrate to the third and the fourth harmonics with strong signal intensity. The most important feature is that both the third and the fourth harmonics can meet the short wavelength requirement with enough signal intensity. This allows the new triple harmonic method to measure FH by the ratio of the fourth over the third harmonics. With the both harmonics in the range of short wavelength, it guarantees the accuracy of FH measurement during the touchdown process.