Magnetoresistive-encoder