-
Notifications
You must be signed in to change notification settings - Fork 25
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
Note gravity and linear accelerometer relationship #59
Conversation
index.bs
Outdated
@@ -216,6 +216,8 @@ The {{GravitySensor}} class is an {{Accelerometer}}'s subclass. The {{GravitySen | |||
|
|||
The <dfn>gravity</dfn> is a force that attracts an object to the center of the earth, or towards any other physical object having mass. | |||
|
|||
Note: The definition of [=gravity=] assumes that the device is not in free fall for more than a short period of time. The relationship between [=gravity=] and [=linear acceleration=] is discussed in [[MOTION-SENSORS#gravity-and-linear-acceleration]]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to actually change the definition of gravity instead of just adding a note. E.g.
The <dfn>gravity</dfn> is the component of the device's acceleration that prevents its velocity from increasing toward nearby masses. Devices in free fall for more than a short period of time MAY compute incorrect values for the gravity.
or similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jyasskin thanks for the proposal. Could we bake that into the existing approximated layman definition and make the "free fall" part a note since I think it is not a testable assertion in this context (and as a consequence "MAY" => "can" to avoid RFC2119 terms in an informative note)?
Here's the updated proposal:
The <dfn>gravity</dfn> is the component of the device's acceleration that prevents its velocity from increasing toward nearby masses.
For most applications, gravity is approximated as a force that attracts an object to the center of the Earth, or towards any other physical object having mass.
Note: Devices in free fall for more than a short period of time can compute incorrect values for the gravity.
The relationship between [=gravity=] and [=linear acceleration=] is discussed in [[MOTION-SENSORS#gravity-and-linear-acceleration]]
Native speakers: do we say "The gravity" to make a point this is the definition in the context of this spec, or drop The?
@reillyeon thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the main issue is fixed with your updated proposal, so feel free to disagree with the following and merge when you're ready.
- I put the "MAY compute incorrect values" in normative text because, if you have tests for the device correctly computing gravity in various situations, and one of those situations is free-fall, the normative text needs to give permission for that test to fail.
- The two normative sentences in the updated proposal imply opposite directions for gravity. "the component of the device's acceleration" points up, and the "force that attracts an object" points down. Based on the spec's examples, I think gravity points up, so you should keep only the first sentence.
- I would use "the gravity" (as you have) to more-clearly say that we're talking about the value returned by the
GravitySensor
, rather than trying to compete with general relativity. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jyasskin, you convinced me to include the "may compute incorrect values" in normative text :-)
With https://w3c.github.io/accelerometer/#reference-frame (and
https://w3c.github.io/accelerometer/#example-1cf0e3e6) we have an upward vectors are positive convention for gravity here.
I updated the PR accordingly, PTAL @reillyeon
13d2860
to
73a1160
Compare
@jyasskin thanks for the review! Merging. |
Fix #58
@jyasskin
Preview | Diff