Hello, I'm trying to track the angular movement of a phone in Android.
For example, if the user rotated the phone upwards (pitched) it by 90 degrees, then rolled it by 180 degrees and then pitched it again by -90 degrees (in the frame of reference of the phone), the output should say - "Total yaw = 0, total pitch = 0, total roll = 180". In another scenario, if the user starts from the same initial position and makes a yaw movement of 180 degrees, the final position of the phone will be same as the one in the above scenario, though the output will say "0 roll, 0 pitch and 180 yaw." I'm trying to use SensorEvent to get orientation values. The problem I'm facing is, that if the phone is held at a tilted angle and then a roll or a pitch movement is made, the value of "yaw" returned by the phone also changes. Similarly, if a make a yaw movement, the pitch and roll values returned also change. Therefore, I am unable to pinpoint whether any particular movement made is a yaw, pitch or a roll movement. I understand that this problem could be solved very simply through some mathematics, but I am unable to find a good starting point. It would be great if someone could point me in the right direction ? Thanks Abhinav -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

