4

I found the rotation matrix returned by SensorManager.getRotationMatrix from link: What's the best 3D angular co-ordinate system for working with smartphone apps

The rotation matrix is: Rotation matrix returned by getRotationMatrix

But I cannot find the steps to reconstruct this matrix when I used the rotation matrix for each axis as specified in link: http://www.freescale.com/files/sensors/doc/app_note/AN3461.pdf

Rotation matrix for each axis

Rotation matrix for each axis

I really appreciate if anyone can show me the steps so that I can construct the above rotation matrix because I cannot find any document that shows me the steps to create this matrix.

And at the above link, there is also a matrix as following: Rotation matrix for compass

How can I calculate the matrix Matrix Rotation matrix for EN plan .What does it mean?

1 Answers1

1

I have the same problem with you at first ,but after i compute the rotation

matrix multiplication in the order y, x, z axis, the result turns right. The

formula in the pdf is wrong. Another hint is that the in Android, the angle

around -X axis is pitch(value[1]) and the angle around -Z is azimuth(value[0]).

So the angle around X axis is -pitch(-value[1]) and the angle around Z is

-azimuth(-value[0]). Finally, multiply all the rotation matrix together u can get the right result.