Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain how the implementation separates gravity from linear acceleration #58

Closed
jyasskin opened this issue Feb 9, 2021 · 3 comments · Fixed by #59
Closed

Explain how the implementation separates gravity from linear acceleration #58

jyasskin opened this issue Feb 9, 2021 · 3 comments · Fixed by #59

Comments

@jyasskin
Copy link
Member

jyasskin commented Feb 9, 2021

In the interest of helping someone in the future produce a greenfield implementation, it would be good if this specification explained or linked to an explanation of how raw sensor values are combined or split into separate linear acceleration vs gravity values. General relativity would seem to imply that such a separation is impossible, but clearly it's been done. 🙃

@anssiko
Copy link
Member

anssiko commented Feb 9, 2021

That's a good point, we somehow missed a reference to an explainer. Do you think an informative note linking to https://w3c.github.io/motion-sensors/#gravity-and-linear-acceleration would be adequate?

@reillyeon
Copy link
Member

The existing definition of gravity could use a note that it assumes that the device is not in free fall for more than a short period of time. It is that assumption which allows the separation of the two components of the force applied to the accelerometer to be separated without violating General Relativity.

@jyasskin
Copy link
Member Author

jyasskin commented Feb 9, 2021

Yes, informatively linking to the information in https://www.w3.org/TR/motion-sensors/#gravity-and-linear-acceleration would solve the problem, along with some fix to the normative definition of gravity along the lines Reilly suggests. Reilly also mentioned that the normative definition could say something about it being the component of acceleration that doesn't cause a change in velocity-relative-to-your-reference-frame ... but I defer to the WG on which change both helps the theoretical problem and accurately describes the output of real implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants