Linear measuring for high-speed motion