Flying-height testers for rigid disk drives employ a transparent glass substrate in place of the magnetic disk and use optical interferometry to measure the flight properties of the read-write slider. Because of the material phase change on reflection, the effective optical constants n and k of the slider play an important role in the measurement. We describe an instrument that determines the optical constants simultaneously with flying height, using polarization interferometry. This in situ analysis of n and k obviates the need for independent ellipsometry, while avoiding the problematic retract calibration characteristic of traditional flying-height test equipment. The rms uncertainty for n and k are 0.04, resulting in height uncertainties that range from 3 nm for 250-nm flying heights down to 0.5 nm at contact. We verify these results by use of a variety of experimental techniques on both laboratory samples and actual read-write sliders.