sinkuri256 / android-scripting

Automatically exported from code.google.com/p/android-scripting
0 stars 0 forks source link

readSensors() not returning values in the expected range #412

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run the attached script

What is the expected output? What do you see instead?
I would expect to see values for pitch and roll in terms of degrees as 
described here:
http://developer.android.com/reference/android/hardware/SensorEvent.html

Instead I'm seeing values ranging between 0 and 2 carried many decimal places 
out.

What version of the product are you using? On what operating system?
Nexus One running Froyo and SL4A_r1

Please provide any additional information below.
This worked previously but I suspect broke around the ase_r25 timeframe. I 
didn't have time to debug it then but our accelerometer app for Cellbots.com 
broke about then.

Original issue reported on code.google.com by rhick...@google.com on 2 Sep 2010 at 11:47

Attachments:

GoogleCodeExporter commented 9 years ago
The values are in radians. See: 
http://developer.android.com/reference/android/hardware/SensorManager.html#getOr
ientation(float[], float[])

The API that provides degrees is inaccurate.

Original comment by damonkoh...@gmail.com on 9 Sep 2010 at 9:33