简体   繁体   中英

How to calculate Rotation Matrix in android from accelerometer and magnetometer sensor

I found the rotation matrix returned by SensorManager.getRotationMatrix from link: https://math.stackexchange.com/questions/381649/whats-the-best-3d-angular-co-ordinate-system-for-working-with-smartphone-apps/382048#382048

The rotation matrix is: 从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

每个轴的旋转矩阵

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: 罗盘的旋转矩阵

How can I calculate the matrix EN平面矩阵 . What does it mean?

You almost got it!

Your general rotation matrix R can be constructed from the axis-specific rotation matrices R_x, R_y, R_z!

The axis-specific rotation matrices rotate around each of the major axes. If you combine them, you'll get the general rotation matrix R you are looking for.

So:

R = R_x * R_y * R_z.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM