Fast method to detect and calculate displacement errors in a Littrow grating-based interferometer.