Compute rotation matrix using the magnetic field

前端 未结 2 627
隐瞒了意图╮
隐瞒了意图╮ 2021-02-04 22:17

In get rotation matrix value it contains public static boolean getRotationMatrix (float[] R, float[] I, float[] gravity, float[] geomagnetic) Here how can i calcula

2条回答
  •  情深已故
    2021-02-04 23:03

    Orientation is not a rotation matrix as it only provides you angles related to magnetic North. You can obtain the rotation matrix (Direction Cosine Matrix) that will help you to transform coordinates from your device frame to the Earth's frame this way :

    DCM from Wikipedia

    with

    azimuth = azimuth (radians)

    pitch = pitch (radians)

    roll = roll (radians)

提交回复
热议问题