Does Android "Game Rotation Vector" ignore rotation around a vertical axis?

I am developing an application that uses Android sensors to help vehicles move indoors. As part of my process of evaluating various sensors, I wanted to try rotation vector sensors. For various reasons, magnetic field readings are not very useful for my location, so I wanted to try the "Vector Rotation Vector" sensor (a fusion of sensors available from API level 18 and above). The description indicates that it is identical to the conventional Vector Rotation Vector sensor, except that the magnetic field information is used to correct the drift of the gyroscope around the vertical axis.

While searching for information on Rotation Vector sensors, I came across an example from Google, where they show a rotation vector sensor using a 3d cube. It works very well, except that it is very sensitive to local magnetic fields (and I’m much farther north, which is even worse, since the horizontal component here is very small).

Since long-term drift can be offset by other reference data (map information), I wanted to use the Vector Rotation Vector sensor for my application. However, when you change all the links from “TYPE_ROTATION_VECTOR” to “TYPE_GAME_ROTATION_VECTOR” in the code example, the cube no longer responds to rotations around the vertical axis (for example, I rotate my chair while holding the device in front of me). Tilting the device in two other directions moved the cube. I also noticed that this time the cube was much more “laggy”, reacting very slowly to any movement.

Is this how the Vector Rotation Vector should work (for example, ignoring any Z axis rotations)? This would be reasonable, since a player in the back seat should not influence the turn of the vehicle, but at the same time it is different from the description provided by Google (my first link). From the description, I had the impression that he would slowly drift, and not ignore the rotation together.

I would be grateful for any material on this issue.

Regards,

John

+4
source share
1 answer

Well, just in case someone finds this, here are my conclusions:

. .

... -, , ( ). Game Rotation Vector , , , 400 .

-, , , , , ( ). , , Vector Rotation Vector ( 180 40 ), . , , , ( ) .

, , , .

+5

All Articles