Search code examples
getorientationeuler-anglesmagnetometer

Orientation from magnetometer data


I saw lot of topics with the same title but answers are different.

I have a magnetometer in my phone which give me the components of magnetic field in direction of X, Y, Z.

Which of the following angles can be determined using datas of magnetometer? Roll, pitch, yaw? And how?

Thank you, Robert


Solution

  • With a magnetometer alone convention would say you could calulate pitch and yaw. Assuming the z axis of the magnetometer points north. If the device was pointed perpendicular to the north vector then it would be able to calculate roll. As I understand it.