New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 816822 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

[Sensor]Screen coordinates for AbsoluteOrientation Sensor got [0,0,0, -1.0] when screen's +Y axis is pointing magnetic north in clockwise 270° mode.

Reported by canx....@intel.com, Feb 27 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

Steps to reproduce the problem:
1. Enable the 'Generic Sensor', 'Generic Sensor Extra Classes' and 'Experimental Web Platform features' in chrome://flags.
2. Run test case 'https://kaixinjxq.github.io/generic-sensor-demos/sensor-info/build/bundled/'.
3. Click the button at the top right corner
4. A popup shows, and choose the "AbsoluteOrientation Screen" Sensor type, click "ADD" button
5. Turn on the switch button 
 6. After rotating the screen, then make sure the +Y axis of screen coordinates points to North.
7. Check the value of sensor's quaternion.

What is the expected behavior?
sensor reports quaternion approach to [0,0,0,1.0] when device is at rest on a leveled surface and dom screen's +Y axis is pointing magnetic north.

What went wrong?
Rotate screen by clockwise:
when rotating screen to 0°/90°/180°/270°, the value of AbsoluteOrientation's quaternion is as below:

Note:
0° means that +X axis of screen coordinates  =  +X axis of device coordinates.
90° means that  +X axis screen coordinates  =  -Y axis of device coordinates.
180° means that  +X axis screen coordinates  =  -X axis device coordinates.
270° means that  +X axis screen coordinates  =  +Y axis device coordinates.

Result:
                                AbsoluteOrientation Screen's quaternion
0°(portrait)                    x -0.011 y -0.003 z -0.183 w 0.976   (PASS)
90°(landscape)                  x: -0.001 y -0.012 z -0.073 w 0.997  (PASS)
180°(clockwise portrait)        x: -0.023 y -0.007 z -0.194 w 0.981  (PASS)
270°(clockwise landscape)       x: 0.005 y 0.019 z -0.116 w -0.993   (expected value:[0,0,0,1.0], but got [0,0,0,-1.0])

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 66.0.3355.0  Channel: canary
OS Version: 10.0
Flash Version:
 

Comment 1 Deleted

Labels: Needs-Triage-M66
Components: Blink>Sensor
Cc: alexande...@intel.com
Labels: Needs-Feedback
This bug was reported on Windows but please confirm the hardware platform you were testing on.

Comment 5 by canx....@intel.com, Mar 1 2018

This issue also exist on Android platform.
My test environment:
Windows : Dell Inspiron 13 7000 Series
Android: Nexus 9
Project Member

Comment 6 by sheriffbot@chromium.org, Mar 1 2018

Cc: reillyg@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Cc: mikhail....@intel.com
Labels: -OS-Windows -Needs-Triage-M66 OS-Android
Status: Available (was: Unconfirmed)
[0,0,0,1.0] and [0,0,0, -1.0] produce the same rotation (pls see http://quaternions.online/ )
Status: WontFix (was: Available)
Thanks Mikhail, closing as working as intended. (I need to study up on quaternions.)

Comment 10 by canx....@intel.com, Mar 14 2018

@Mikhail.
But whatever how many circles I rotated back to the position(screen +Y axis points magnetic north.), I always got -1(never seen 1), is that also expected?
 canx.cao@ from rotation perspective [0,0,0,1.0] and [0,0,0, -1.0] are equivalent (pls see https://bugs.chromium.org/p/chromium/issues/detail?id=816822#c8)

Sign in to add a comment