title: pitch value is -90 degree to 90 degree when reading orientation from android
body: <p>I am reading the orientation values of the phone, the azimuth and roll data are quite OK as they are -180 to 180, but I have problem on pitch as it is -90 to 90 only when I rotate the phone from 0 degree to 360 degree.</p>
  
  <pre><code>SensorManager.getRotationMatrixFromVector(mRotationMatrix, event.values);
  SensorManager.getOrientation(mRotationMatrix, orientationVals);
  float azimuth = (float)Math.toDegrees(orientationVals[0]); 
  float pitch = (float)Math.toDegrees(orientationVals[1]);
  float roll = (float)Math.toDegrees(orientationVals[2]);
  float deltaX = Math.abs(mLastOrientation[0] - azimuth);
  float deltaY = Math.abs(mLastOrientation[1] - pitch);
  float deltaZ = Math.abs(mLastOrientation[2] - roll);
  if (deltaX &lt; ORIENTATIONNOISE) azimuth = mLastOrientation[0];
  if (deltaY &lt; ORIENTATIONNOISE) pitch = mLastOrientation[1];
  if (deltaZ &lt; ORIENTATIONNOISE) roll = mLastOrientation[2];  
  mLastOrientation[0] = azimuth;
  mLastOrientation[1] = pitch;
  mLastOrientation[2] = roll;
  </code></pre>
  
  <p>Could anyone help. Thanks</p>