A position sensor device comprising: a substrate comprising a first, a second and a third magnetic sensor (S1, S2, S3) spaced apart in a first direction, each magnetic sensor capable of measuring at least a first magnetic field component (Bx) oriented in the first direction, and a second magnetic field component (Bz) oriented in a second direction (Y; Z) perpendicular to the first direction; a processing circuit connected to said magnetic sensors (S1, S2, S3), and configured for: a) determining a first difference (ΔBx13) between the first magnetic field components (Bxl, Bx3) provided by the first and the third sensor (S1, S3), and configured for determining a second difference (ΔBz13) between the second magnetic field components (Bzl, Bz3) provided by the first and the third sensor (S1, S3), and for calculating a first angle (θmain) based on a ratio of the first difference (ΔBx13) and the second difference (ΔBz13), and for outputting the first angle (θmain); b) and for determining a third difference (ΔBx12) between the first magnetic field component provided by the second sensor and the first magnetic field component provided by one of the first and the third sensor; c) and for determining a fourth difference (ΔBz12) between the second magnetic field component provided by the second sensor and the second magnetic field component provided by said one of the first and the third sensor; d) and for determining a second angle (θaux12; θaux3) based on the third and the fourth difference (ΔBx12, ΔBz12), and for outputting said second angle (θaux12; θaux3) and/or a diagnostic signal derived from a comparison of the first angle (θmain) and said second angle (θaux12; θaux3) or a value derived therefrom. a substrate comprising a first, a second and a third magnetic sensor (S1, S2, S3) spaced apart in a first direction, each magnetic sensor capable of measuring at least a first magnetic field component (Bx) oriented in the first direction, and a second magnetic field component (Bz) oriented in a second direction (Y; Z) perpendicular to the first direction; a processing circuit connected to said magnetic sensors (S1, S2, S3), and configured for: a) determining a first difference (ΔBx13) between the first magnetic field components (Bxl, Bx3) provided by the first and the third sensor (S1, S3), and configured for determining a second difference (ΔBz13) between the second magnetic field components (Bzl, Bz3) provided by the first and the third sensor (S1, S3), and for calculating a first angle (θmain) based on a ratio of the first difference (ΔBx13) and the second difference (ΔBz13), and for outputting the first angle (θmain); b) and for determining a third difference (ΔBx12) between the first magnetic field component provided by the second sensor and the first magnetic field component provided by one of the first and the third sensor; c) and for determining a fourth difference (ΔBz12) between the second magnetic field component provided by the second sensor and the second magnetic field component provided by said one of the first and the third sensor; d) and for determining a second angle (θaux12; θaux3) based on the third and the fourth difference (ΔBx12, ΔBz12), and for outputting said second angle (θaux12; θaux3) and/or a diagnostic signal derived from a comparison of the first angle (θmain) and said second angle (θaux12; θaux3) or a value derived therefrom. a) determining a first difference (ΔBx13) between the first magnetic field components (Bxl, Bx3) provided by the first and the third sensor (S1, S3), and configured for determining a second difference (ΔBz13) between the second magnetic field components (Bzl, Bz3) provided by the first and the third sensor (S1, S3), and for calculating a first angle (θmain) based on a ratio of the first difference (ΔBx13) and the second difference (ΔBz13), and for outputting the first angle (θmain); b) and for determining a third difference (ΔBx12) between the first magnetic field component provided by the second sensor and the first magnetic field component provided by one of the first and the third sensor; c) and for determining a fourth difference (ΔBz12) between the second magnetic field component provided by the second sensor and the second magnetic field component provided by said one of the first and the third sensor; d) and for determining a second angle (θaux12; θaux3) based on the third and the fourth difference (ΔBx12, ΔBz12), and for outputting said second angle (θaux12; θaux3) and/or a diagnostic signal derived from a comparison of the first angle (θmain) and said second angle (θaux12; θaux3) or a value derived therefrom.