New issue
Advanced search Search tips

Issue 810700 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Feb 2018
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

[Sensor] Screen coordinates does not synchronize with device coordinates when rotating the scrren

Reported by canx....@intel.com, Feb 9 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. Access to 'https://google.com'.
 3.  Debug in the console as below (I sava the image,please refer to attach file "init.JPG"):
let acc1 = new Accelerometer({referenceFrame: "screen"});
acc1.start();
acc1
let acc2 = new Accelerometer();
acc2.start();
acc2
 4. Check the value of sensor's x,y,z. Expected result: acc1 and acc2 should be similar. (It Works fine).
 5. After rotating the device and screen, debug in the console as below(I sava the image,please refer to attach file "RotateScreen.JPG"):
let acc3 = new Accelerometer({referenceFrame: "screen"});
acc3.start();
acc3
let acc4 = new Accelerometer();
acc4.start();
acc4

What is the expected behavior?
Screen coordinates should synchronize with device coordinates. 
acc3.x shoud same as acc4.y
acc3.y should same as -'acc4.x'

What went wrong?
acc3.x got complex number. it should same as acc4.y

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 66.0.3343.0  Channel: canary
OS Version: 10.0
Flash Version:
 
init.JPG
457 KB View Download
RotateScreen.JPG
420 KB View Download

Comment 1 by canx....@intel.com, Feb 9 2018

@ alexander.shalamov@intel.com; wanming.lin@intel.com
Please take a look. Thanks.
Labels: Needs-Triage-M66

Comment 3 by canx....@intel.com, Feb 12 2018

This issue exists on Linux, Windows and Android. it cannot reproduce on Chrome OS.

My hardware for test environment:
Linux : Dell Inspiron 13 7000 Series
Android : Nexus 9 
Windows : Dell Inspiron 13 7000 Series
Chrome OS: Google_Samus.6300.174.0
Status: WontFix (was: Unconfirmed)
From the saved images it works as expected:
In default position, both sensors have Y is around -9.5; X is around -0.1.

In the rotated position (screen X and Y swapped)
Screen sensor: Y is around -9.6; X is around -0.03 (so, also swapped)
Device sensor: X is around -9.6; Y is around -0.07

Note: sensor measurements fluctuate at every reading, the sensor's accuracy must also be considered.

Comment 5 by canx....@intel.com, Feb 13 2018

@mikhail, thanks for your comment.
I know in the rotated position (screen X and Y swapped) ,but for the saved images, device sensor's coordinates change by the rotation. I think when rotated the device as the image, screen sensor's Y and device sensor's x are opposite.

Thanks.

Comment 6 by canx....@intel.com, Feb 23 2018

@mikhail...@intel.com, pls. correct me if my understanding is wrong.

for Device Sensor, the value is around 9.8 when each axis(x, y, z) points to the sky perpendicularly,  is it the same for Screen Sensor?  
In the rotated position, screen Y points to the sky, the expected value should be around 9.6. 

Thanks.
 canx.cao@ not sure I understand the problem (could you explain in more details?) but in "screen" case the coordinate system is bound to the current screen orientation, so when screen Y points to the sky its value should be around 9.8

Comment 8 by canx....@intel.com, Mar 13 2018

See the picture RotateScreen.JPG, we rotated the screen 270°, 
then set the screen Y points to the sky, but its value is around -9.8(should be around 9.8), the Device X points to the ground its value is around -9.8. 

Sign in to add a comment