title: get orientation values through accelerometer
body: <p>I am currently working on how to get orientation values (yaw, pitch, roll) through the accelerometer values. 
  Below is the way I am currently using, but the orientation values seem to be wrong, are there any problems or mistakes I have ignored?
  Thanks a lot for the help!</p>
  
  <pre><code>if (sensor.getType() == Sensor.TYPE_ACCELEROMETER) {
          accelerometerValues = event.values;
      }
  
      if (sensor.getType() == Sensor.TYPE_MAGNETIC_FIELD) {
          magneticFieldValues = event.values;
      }
  
      SensorManager.getRotationMatrix(rotate, null, accelerometerValues,
              magneticFieldValues);
      SensorManager.getOrientation(rotate, rotationValues);
  
      // change radian to degree
      rotationValues[0] = (float) Math.toDegrees(rotationValues[0]);
      rotationValues[1] = (float) Math.toDegrees(rotationValues[1]);
      rotationValues[2] = (float) Math.toDegrees(rotationValues[2]);
  </code></pre>