Orientation Sensor

  • Replies:0
Ahmet Pelit
  • Forum posts: 1

Jan 28, 2013, 9:54:34 AM via Website

Hi Everyone,

I want to make a simple application by using orientation sensor. I have a samsung tablet 8.9, I want to get roll angles when in landscape mode and camera on top. In sensorchanged events, I'm getting some values like bottom. I dont understand this values what do they mean. I want get roll degree, like 30,45,65 etc. Can you help me?

Azimuth:0.6732523
pitch:-0.05696452
Roll:-0.0632541




public void onSensorChanged(SensorEvent event) {
text1.setText("Azimuth: " + String.valueOf(event.values[0]));
text2.setText("Pitch: " + String.valueOf(event.values[1]));
text3.setText("Roll: " + String.valueOf(event.values[2]));
}

Reply