Different values between sensors TYPE_ACCELEROMETER/TYPE_MAGNETIC_FIELD and TYPE_ORIENTATION

后端 未结 3 775
不思量自难忘°
不思量自难忘° 2020-12-07 16:57

There are 2 ways to get the 3 rotation values (azimuth, pitch, roll).

One is registering a listener of a type TYPE_ORIENTATION. It\'s the easiest way and I get a cor

3条回答
  •  离开以前
    2020-12-07 17:32

    You are missing one critical computation in your calculations.
    The remapCoordinateSystem call afer you do a getRotationMatrix.

    Add that to your code and all will be fine.
    You can read more about it here.

提交回复
热议问题