View Single Post
Old May 3rd, 2009, 05:35 PM
peterkirn peterkirn is offline
Registered User
Join Date: May 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

One other note re: sensors - I'm seeing values that appears to be swapped.

In chapter 10 (and, indeed, in Google's documentation), roll, pitch, and heading are:
roll = DATA_X
pitch = DATA_Y
heading = DATA_Z

Note that, if I'm reading the reference correctly, these may need to be swapped to values[3], [4], and [5] if you want them to persist between different orientations of the device. Irrespective of referring to them by int or name, though, in testing the app on the G1 / OS 1.1, I get:

heading = values[3] aka DATA_X
pitch = values[4] aka DATA_Y
roll = values[5] aka DATA_Z

Any idea what might account for this? Will this work across devices, or just the G1?

Maybe this is solved, though, by the new sensor API.