Optical device (54) for determining the spatial frequency of a diffraction grating (34), characterised in that this device is associated with a reference grating (56) and in that it comprises first and second interferometric diffractive sensors (4, 6) which are integral and comprise respectively first and second reading gratings which are shifted relative to a direction parallel to their lines so that they are able to be located respectively opposite said diffraction grating and said reference grating, these first and second sensors providing respectively first and second electrical signals which, during a relative displacement between the device and said diffraction grating, are respectively a function of the spatial frequency of said diffraction grating and of the spatial frequency of said reference grating.