magnetic encoder positioning