A system comprising a sensor assembly adapted to measure a magnetic field, and a mechanical assembly comprising an indicator element with a magnet moving together therewith, the magnet being configured to generate a spatial magnetic field which relative to the sensor assembly varies corresponding to the spatial position and orientation of the magnet, wherein the indicator element is adapted to both rotate and move axially during operation of the assembly. Processor means is configured to determine on the basis of measured values both a rotational position and an axial position of the indicator element.