Linear encoder uses magnetic measurement