Pulsars as celestial beacons to detect the motion of the Earth