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

editorial: Add a separate section describing model, rewrite contents #117

Merged
merged 3 commits into from
Nov 9, 2023

Conversation

rakuco
Copy link
Member

@rakuco rakuco commented Nov 7, 2023

The 3 changes here are related but I feel like they should be separate commits.

The idea is to 1) make the spec easier to read by not mixing explanations about the motion and orientation models with descriptions of IDL attributes 2) make the explanations easier to understand by clarifying some concepts, especially the Device Orientation-related ones.


Preview | Diff

This gets rid of a lot of tags that we do not need to care about. While at
it, use the `<figure>` tag to group the images and their descriptions.
…rence coordinates

The goal is to make it easier to understand what DeviceOrientationEvent
represents and better explain the difference between relative and absolute
orientation.

- Stop saying relative orientation is relative to the "Earth coordinate
  frame". Relative orientation is relative to an arbitrary reference frame
  that varies across platforms.
- Refer to the "device coordinate system" defined in the Accelerometer spec,
  which is the same coordinate system we were defining here. The text there
  also contains a helpful image besides the textual explanation.
- Provide links to different absolute and relative orientation sensor
  resources in native platforms.
- For absolute orientation, refer to Orientation Sensor's "Earth's reference
  coordinate system", which is basically the "Earth coordinate frame"
  we had in this specification but with the Y axis pointing to the magnetic
  North, not True North. The previous version of the text was very vague
  when it came to explaining what "absolute" meant; this version reflects
  what Gecko, WebKit and Blink use when providing absolute orientation
  values.
- Remove the "Earth coordinate frame" explanation altogether, as nothing
  references it anymore.
@rakuco rakuco requested a review from reillyeon November 7, 2023 22:48
index.bs Outdated Show resolved Hide resolved
index.bs Outdated Show resolved Hide resolved

This specification expresses a device's physical orientation as a series of rotations relative to an <a>implementation-defined</a> reference coordinate frame.

The sequence of rotation steps is a set of intrinsic Tait-Bryan angles of type Z - X' - Y'' ([[EULERANGLES]]) that are applied on the <a>device coordinate system</a> defined in [[!ACCELEROMETER]] and summarized below:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm nervous about referencing a definition from a specification that is less far along the standards track than this one. I am curious for @anssiko's opinion here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is about the device coordinate system definition. We can use these three factors to assess the associated risk for referencing this definition: stability, schedule and licensing (from the normative references guide):

  • Stability:
    • Stability of the referenced document: The WG believes the specification is stable and has demonstrated it is implementable but awaits further implementation experience before advancing to a Proposed Rec.
    • Stability of the referenced part(s): This definition refers to an established coordinate system, a Cartesian coordinate system, and the right-hand rule, a common convention for the orientation of axes in 3D space.
    • Nature of the dependency: A coordinate system convention.
    • Status of implementations: Chromium implementations, automated tests.
  • Schedule: The Accelerometer specification is a Candidate Recommendation Draft.
  • Licensing: The Accelerometer specification uses a permissive document license, the same as this specification.

Considering these three factors, I think it is appropriate to incorporate this device coordinate system definition as a reference. If this definition would go away for some reason, it would be relatively easy to copy-paste this definition into this specification without delaying possible future transition significantly.

@himorin, let us know if you think otherwise.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the link to that guide. I think given the nature of the reference (definitions of sensor concepts, rather than anything specific to the Generic Sensor API) this is fine.

…odel" section

The idea is to have the more general discussion about what is being measured
and how in one section separate from the section that covers the API, each
event's attributes and security requirements.

The device orientation contents in particular were quite long and mixed with
normative IDL descriptions and requirements that made the text confusing to
follow.

The new "device orientation model" section has separated the description of
the rotation steps from the discussion of different reference frames.

The new "device motion model" section has some of the old content, but more
text has been added along with references to the MOTION-SENSORS,
ACCELEROMETER and GYROSCOPE specs which not only implement the same
functionality but also have more in-depth content about the same topics.
@rakuco rakuco force-pushed the editorial-improvements-to-model-explanation branch from 06c1e8a to 7db68d7 Compare November 9, 2023 12:46
@rakuco rakuco merged commit cc5abc7 into main Nov 9, 2023
2 checks passed
@rakuco rakuco deleted the editorial-improvements-to-model-explanation branch November 9, 2023 20:24
github-actions bot added a commit that referenced this pull request Nov 9, 2023
…anation

SHA: cc5abc7
Reason: push, by rakuco

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit that referenced this pull request Nov 10, 2023
…anation

SHA: cc5abc7
Reason: push, by rakuco

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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 this pull request may close these issues.

None yet

3 participants