Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

DeviceOrientation documentation contains errors #313

Closed
steveblock opened this Issue · 3 comments

3 participants

@steveblock

http://www.html5rocks.com/en/tutorials/device/orientation/#toc-whichendisup

  • 'The rotation data uses Euler angles to represent the difference between the device in it’s normal position and it’s current position'. The angles represent the rotation between the local earth frame and the device frame. To align the device frame with the local earth frame, the phone must not only be on a horizontal surface, but the positive y axis must point north. Describing rotations from the 'normal position' is not sufficient.

  • 'An easier way to think about it is how much the device is tilted side-to-side, usually referred to as beta.' Beta measures rotation about the x axis, ie front-to-back 'pitch'. Side-to-side 'roll' is measured by gamma, which gives rotation about the y axis, as you show in the diagram above.

  • Diagram 'The phone is rotated on the Y-Axis by gamma degrees.' This is confusing because it looks like the y axis isn't aligned with the long axis of the device. Also, it would be good to show the direction of positive gamma, which is positive (using the right-hand-rule) rotation about the y axis.

http://www.html5rocks.com/en/tutorials/device/orientation/#toc-deviceorientation

  • 'The device orientation event returns only the rotation data, which includes how much the device is leaning side-to-side (beta), front-to-back (gamma)'. As above, side-to-side is gamma, front-to-back is beta.

  • The four figures are very confusing to me. In the first two cases, if the device is on a 'flat' (I assume you mean horizontal) surface, surely the viewer must be looking down (albeit with north at the top of their field of view), not north? In the second figure, the text should be upside-down (rotated about a vertical axis), not flipped left-right (rotated about a horizontal north-south axis). In the third figure, are you trying to show the device with its screen in a vertical plane, but with the top of the screen leaning towards the viewer's right? If so, this should be {beta: 45, gamma: 90}. In general, I think it would be helpful to use more precise terminology, rather than 'facing' and 'pointing'.

http://www.html5rocks.com/en/tutorials/device/orientation/#toc-devicemotion

  • In the tables, 'Accelerating left' should be 'Accelerating right'. Also, it would be good to use a consistent value for the magnitude of the acceleration due to gravity.
@petele petele was assigned
@ebidel
Owner

@petele any way you could take a look at updating the article?

@petele
Owner
@petele
Owner

Pull request submitted.

@ebidel ebidel closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.