The issue is that the implementation of the orientation angles in 1.0
isn't actually pitch and roll, it's pitch around the x axis and pitch
around the y axis.
This was deeply improved for cupcake. Yes, we've maintained
compatibility with the old API too.
JBQ
On Mon, Jan 26, 2009 at 1:10 PM, blindfold seeingwithso...@gmail.com wrote:
I'm similarly getting more and more confused with the orientation
sensor readings. With my dev phone 1 running in landscape mode, and
the phone standing on its left side, values[1] = 0 and values[2] =
-90. So far so good. Then when I lift the right side of the phone such
that the screen rotates counterclockwise (leaning just a few degrees
forward to stay away from any +/-180 jumps etc), values[1] - values[2]
remains constant at 90, while I am only rotating around the axis
perpendicular to the screen. Apparently Android sees the rotation
around the (Z) axis perpendicular to the screen as a rotation around
*both* X and Y axis. Or if I assume that the axes form an external
coordinate system with the Z axis pointing upward out of my table top,
then I would expect a values[1] azimuth dependency, but when azimuth
is kept at 0 (or any other heading for that matter) I still see the
same values[1] - values[2] = 90 effect. I do not understand this
coupling between values[1] and values[2]. How are the X and Y axis
defined to cause this strange dependency between roll and pitch? I
expected independent axes but it looks like X, Y and Z are not
orthogonal?
As a further experiment, I first carefully put my phone in orientation
values[] = {45,45,-45} by first putting the phone standing on its left
side and then tilting the right side to rotate the screen 45 degrees
counterclockwise as described before, now also adjusting the compass
heading by rotating around the axis pointing up from my table top to
make values[0] = 45 as well. Then I found that if I very carefully
rotated the phone around its long screen axis backward, I can add a
significant tilt without changing the {45,45,-45} orientation vector
reading much.
Anyone here who really understands the G1 orientation sensor's
coordinate system?
Thanks
On Dec 24 2008, 1:20 am, Nick nicholasdo...@gmail.com wrote:
Hello,
If I have a pitch of 0 or 180 I can roll between -90 and 90 as
expected. However as the pitch approaches 90 and -90 the roll range
decreases proportionally. Should roll be independent of pitch? Also, I
expected roll to have a range of -180 to 180.
Any help is appreciated.
Nick
--
Jean-Baptiste M. JBQ Queru
Android Engineer, Google.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---