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

sensors: Read Euler angles instead of quaternions from WebDriver #44145

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jan 23, 2024

As a result of w3c/deviceorientation#124 and
w3c/orientation-sensor#83.

The reading format is alpha-beta-gamma as described in the spec. They
are measured in degrees and must fall within certain ranges. Internally,
however, we always perform the Euler angles to quaternions conversion at
the edges (i.e. in ChromeDriver and the Internals implementation used by
content_shell), so that the the CDP and //services layers remain
unchanged and continue to support only quaternions and the
{ABSOLUTE,RELATIVE}_ORIENTATION_QUATERNION types for simplicity.

The code to convert Euler angles to quaternions was copied from
SensorInspectorAgent in Blink and is available for use by any callers
that need to validate Euler angles and convert them. The original code
remains in place because the entirety of the SensorInspectorAgent will
be removed soon due to the work on bug 1506995.

The test values for the orientation-sensor web tests had to be adapted:
we now provide the inputs as Euler angles. The expected values have
changed slightly as we had to find Euler and quaternion values that
were easy enough to read.

Written in collaboration with Juha Vainio <juha.j.vainio@intel.com>

Bug: 1506995, 1520912, 1520919
Validate-Test-Flakiness: skip
Change-Id: I047f41f172f0bbcf30c7462926cec7ae0a66d4e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5229177
Commit-Queue: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Vladimir Nechaev <nechaev@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1251287}

As a result of w3c/deviceorientation#124 and
w3c/orientation-sensor#83.

The reading format is alpha-beta-gamma as described in the spec. They
are measured in degrees and must fall within certain ranges. Internally,
however, we always perform the Euler angles to quaternions conversion at
the edges (i.e. in ChromeDriver and the Internals implementation used by
content_shell), so that the the CDP and //services layers remain
unchanged and continue to support only quaternions and the
{ABSOLUTE,RELATIVE}_ORIENTATION_QUATERNION types for simplicity.

The code to convert Euler angles to quaternions was copied from
SensorInspectorAgent in Blink and is available for use by any callers
that need to validate Euler angles and convert them. The original code
remains in place because the entirety of the SensorInspectorAgent will
be removed soon due to the work on bug 1506995.

The test values for the orientation-sensor web tests had to be adapted:
we now provide the inputs as Euler angles. The expected values have
changed slightly as we had to find Euler _and_ quaternion values that
were easy enough to read.

Written in collaboration with Juha Vainio <juha.j.vainio@intel.com>

Bug: 1506995, 1520912, 1520919
Validate-Test-Flakiness: skip
Change-Id: I047f41f172f0bbcf30c7462926cec7ae0a66d4e5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5229177
Commit-Queue: Raphael Kubo Da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Vladimir Nechaev <nechaev@chromium.org>
Reviewed-by: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1251287}
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 95e6ad0 into master Jan 24, 2024
21 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-5229177 branch January 24, 2024 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants