W3C home > Mailing lists > Public > public-device-apis-log@w3.org > July 2021

Re: [deviceorientation] Opposite z-axis for example 7 (#96)

From: Raphael Kubo da Costa via GitHub <sysbot+gh@w3.org>
Date: Wed, 07 Jul 2021 13:31:41 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-875606800-1625664699-sysbot+gh@w3.org>
Here's my understanding of it:

`accelerationIncludingGravity` is supposed to represent [_"the acceleration of the hosting device, plus an acceleration equal and opposite to the acceleration due to gravity"_](https://w3c.github.io/deviceorientation/#ref-for-dom-devicemotionevent-accelerationincludinggravity%E2%91%A3), so if the device is lying flat on a horizontal surface, the host device's acceleration is 0, gravity is -9.8 and therefore `accelerationIncludingGravity.z` is 9.8.

In example 8, it's `acceleration.z` that is -9.8, while `accelerationIncludingGravity.z` would be -9.8 from `acceleration.z` + 9.8 of an acceleration equal and opposite to the acceleration due to gravity = 0.

-- 
GitHub Notification of comment by rakuco
Please view or discuss this issue at https://github.com/w3c/deviceorientation/issues/96#issuecomment-875606800 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 7 July 2021 13:35:02 UTC

This archive was generated by hypermail 2.4.0 : Monday, 4 July 2022 12:47:58 UTC