I'm new in the rotation matrices field and I'm trying to understand the behave of the Rotation Vector Sensor. I can't understand the relation between yaw, pith and roll with the values returned by the Rotation Vector Sensor.
I checked the source code of the SensorManager.getRotationMatrixFromVector() here and the Android documentation. The Rotation vector sensor returns the following values:
values[0]: x*sin(θ/2)
values[1]: y*sin(θ/2)
values[2]: z*sin(θ/2)
values[3]: cos(θ/2)
values[4]: estimated heading Accuracy (in radians) (-1 if unavailable)
From the documentation: "the device has rotated through an angle θ around an axis (x, y, z)". So my dubt now is, what is θ? And what are x,y and z? Following this tutorial from the OpenGL documentation, to rotate a vector V I need the pith, roll and yaw values with which I build the rotation matrix. At the end I have to multiply this matrix by V to rotate the vector. If I'm right, this matrix is different from the one related to the values vector obtained using SensorManager.getRotationMatrixFromVector(). Am I right? So what represents that matrix?