A sensor for detecting a position of a mechanical component within a polar spherical coordinate reference
system, comprising, accommodated inside a sensor body of the sensor: a linear
position sensor configured to detect a first linear coordinate of a position of a free end of a slider in the polar spherical coordinate reference
system; an acceleration sensor; an angular speed sensor; a
data processing unit configured to: determine a second
colatitude coordinate and a third
longitude coordinate of said position based on acceleration values and angular speed values detectable by said sensors; store in a memory unit a plurality of sets of three detected polar spherical coordinates representative of a path travelled by the free end of the slider in said reference
system.