Get Euler Yaw angle of an Android Device
<p>I'm trying to get yaw of an android device expressed in euler angles.</p>

<p>To be clear i dont want 'Azimuth' (which is the angle to magnetic north) I want the rotation of the 'z' axis of an android device as shown in this picture.</p>

<p><a href="https://i.stack.imgur.com/5cU1Q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5cU1Q.png" alt="enter image description here"></a></p>

<p>This (IMHO) should be the axis used in some car games to determine the amount of steering.</p>

<p>It is my understanding I could just use the Accelerometer values (without the magnetic fields) but I'm unable to get the determined value. (probably due to a lack of understanding of how rotation matrixes works).</p>

<p>Can someone point me toward the right direction?</p>