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
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.