DeviceOrientation documentation contains errors #313

Closed
opened this Issue Mar 5, 2013 · 3 comments

Projects
None yet
3 participants

steveblock commented Mar 5, 2013

 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.

Owner

ebidel commented Jun 12, 2013

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

petele commented Jun 13, 2013

 I'll put a block of time on my calendar for the start of Q3. On Wed, Jun 12, 2013 at 1:04 PM, Eric Bidelman notifications@github.comwrote: @petele https://github.com/petele any way you could take a look at updating the article? — Reply to this email directly or view it on GitHubhttps://github.com/html5rocks/www.html5rocks.com/issues/313#issuecomment-19339924 . Pete LePage | Developer Advocate | petele@google.com | 650-733-6404
Owner

petele commented Jul 12, 2013

 Pull request submitted.

Merged