Jasper Catthoor
Jasper Catthoor

Reputation: 625

Android gyroscope y-axis roll

Using the Android gyroscope, the value of the y-axis-rotation is 0 when I lay my android on its screen but also when I lay my android on its back.

The values go from 0 to 90 back to 0; and from 0 to -90 back to 0.

How would I go about having it go from 0 to 360°?

Android axis

Upvotes: 0

Views: 1010

Answers (1)

Alexander Pacha
Alexander Pacha

Reputation: 9750

I guess the problem you are facing is due to the representation that you are using. When using Euler-Angles you are somewhat restricted to the following output (as far as I know): One axis (of your choice) will return 360°, the other two only -90° to +90°.

I recommend that you either use a different representation such as Quaternions or Rotation Vectors/Matrix.

Upvotes: 1

Related Questions