Acceleration from device's coordinate system into absolute coordinate system

前端 未结 4 1768
梦谈多话
梦谈多话 2020-12-02 06:32

From my Android device I can read an array of linear acceleration values (in the device\'s coordinate system) and an array of absolute orientation values (in Earth\'s coordi

4条回答
  •  借酒劲吻你
    2020-12-02 06:52

    According to the documentation you get the linear acceleration in the phone's coordinate system.

    You can transform any vector from the phone's coordinate system to the Earth's coordinate system by multiplying it with the rotation matrix. You can get the rotation matrix from getRotationMatrix().

    (Perhaps there already is a function doing this multiplication for you but I don't do Android programming and I am not familiar with its API.)

    A nice tutorial on the rotation matrix is the Direction Cosine Matrix IMU: Theory manuscript. Good luck!

提交回复
热议问题