A position sensor system (100; 150; 200; 250; 1200; 1250) for determining a position (X, α) of a sensor device (102; 152; 202; 252; 1202; 1252) relative to a magnetic structure (101; 201; 1201), the system comprising: - said magnetic structure (101; 201; 1201) comprising a plurality of poles; - said sensor device comprising a plurality of magnetic sensors for determining one or more magnetic field components and for determining a magnetic field gradient; - the magnetic structure being movable (X, α) relative to the sensor device in a movement direction or along a movement trajectory, or vice versa; characterised in that - a distance (Xpp, αpp) between centres of adjacent poles of the magnetic structure varies along the movement direction or along the movement trajectory; - the sensor device is adapted: a) for determining one or more first magnetic field components (Bx1, Bx2) oriented in a first direction (X; U) substantially parallel to said movement direction or tangential to said movement trajectory, and one or more second magnetic field components (Bz1, Bz2) oriented in a second direction (Z; V) substantially perpendicular to the first direction (X; U), and for calculating a coarse signal (Sc) based on these magnetic field components (Bx1, Bx2, Bz1, Bz2); and b) for determining a first gradient (dBx/dx; dBu/du) of the one or more first magnetic field component along the first direction (X; U), and a second gradient (dBz/dx; dBv/du) of the one or more second magnetic field component (Bz; Bv) along the first direction (X; U), and for calculating a fine signal (Sf) based on these gradients; and c) for determining said position (X, α) based on both the coarse signal (Sc) and the fine signal (Sf). - said magnetic structure (101; 201; 1201) comprising a plurality of poles; - said sensor device comprising a plurality of magnetic sensors for determining one or more magnetic field components and for determining a magnetic field gradient; - the magnetic structure being movable (X, α) relative to the sensor device in a movement direction or along a movement trajectory, or vice versa; - a distance (Xpp, αpp) between centres of adjacent poles of the magnetic structure varies along the movement direction or along the movement trajectory; - the sensor device is adapted: a) for determining one or more first magnetic field components (Bx1, Bx2) oriented in a first direction (X; U) substantially parallel to said movement direction or tangential to said movement trajectory, and one or more second magnetic field components (Bz1, Bz2) oriented in a second direction (Z; V) substantially perpendicular to the first direction (X; U), and for calculating a coarse signal (Sc) based on these magnetic field components (Bx1, Bx2, Bz1, Bz2); and b) for determining a first gradient (dBx/dx; dBu/du) of the one or more first magnetic field component along the first direction (X; U), and a second gradient (dBz/dx; dBv/du) of the one or more second magnetic field component (Bz; Bv) along the first direction (X; U), and for calculating a fine signal (Sf) based on these gradients; and c) for determining said position (X, α) based on both the coarse signal (Sc) and the fine signal (Sf). a) for determining one or more first magnetic field components (Bx1, Bx2) oriented in a first direction (X; U) substantially parallel to said movement direction or tangential to said movement trajectory, and one or more second magnetic field components (Bz1, Bz2) oriented in a second direction (Z; V) substantially perpendicular to the first direction (X; U), and for calculating a coarse signal (Sc) based on these magnetic field components (Bx1, Bx2, Bz1, Bz2); and b) for determining a first gradient (dBx/dx; dBu/du) of the one or more first magnetic field component along the first direction (X; U), and a second gradient (dBz/dx; dBv/du) of the one or more second magnetic field component (Bz; Bv) along the first direction (X; U), and for calculating a fine signal (Sf) based on these gradients; and c) for determining said position (X, α) based on both the coarse signal (Sc) and the fine signal (Sf).