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

Issue 709913 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Email to this user bounced
Closed: Apr 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

[sensor] the data produced from populateMatrix function with Float32Array is incorrect

Reported by canx....@intel.com, Apr 10 2017

Issue description

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

Steps to reproduce the problem:
Test Case:https://thewebera.github.io/web-test-suite/generic-sensor/sensors/AbsoluteOrientationSensor.https.html
Test Name: the data produced from Float32Array populateMatrix function is correct

What is the expected behavior?
The data produced from populateMatrix function with Float32Array is correct.

The expected data:
0: 0.5350068807601929
1: -0.8448300361633301
2: -0.005295960698276758
3: 0
4: 0.2369677871465683
5: 0.14404357969760895
6: 0.960777997970581
7: 0
8: -0.8109328150749207
9: -0.5152769684791565
10: 0.27726295590400696
11: 0
12: 0
13: 0
14: 0
15: 1

What went wrong?
The data produced from populateMatrix function with Float32Array is incorrect.

The actually value:
0: 0.5350069064971557
1: -0.8448300126842838
2: -0.005295960606389372
3: 0
4: 0.23696778051024125
5: 0.14404358220666147
6: 0.9607780082009061
7: 0
8: -0.8109328384835095
9: -0.5152769737823757
10: 0.27726297020016766
11: 0
12: 0
13: 0
14: 0
15: 1

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 59.0.3064.0  Channel: canary
OS Version: windows 10
Flash Version: Shockwave Flash 25.0 r0

The DOMMatrix and Float64Array populateMatrix function is works fine.
Spec Link:https://w3c.github.io/orientation-sensor/#orientationsensor-populatematrix
Description:If targetMatrix is of Float32Array or Float64Array type, run these sub-steps:
Set targetMatrix[0] = 1 - 2 * y * y - 2 * z * z
Set targetMatrix[1] = 2 * x * y - 2 * z * w
Set targetMatrix[2] = 2 * x * z + 2 * y * w
Set targetMatrix[3] = 0
Set targetMatrix[4] = 2 * x * y + 2 * z * w
Set targetMatrix[5] = 1 - 2 * x * x - 2 * z * z
Set targetMatrix[6] = 2 * y * z - 2 * x * w
Set targetMatrix[7] = 0
Set targetMatrix[8] = 2 * x * z - 2 * y * w
Set targetMatrix[9] = 2 * y * z + 2 * x * w
Set targetMatrix[10] = 1 - 2 * x * x - 2 * y * y
Set targetMatrix[11] = 0
Set targetMatrix[12] = 0
Set targetMatrix[13] = 0
Set targetMatrix[14] = 0
Set targetMatrix[15] = 1
 
Owner: mikhail....@intel.com
canx.cao@ IEEE 754 (4 bytes float) supports 7 decimal places, so, I think there is no problem with Float32Array test, this is expected behavior. OrientationSensor.quaternion has double precision (64 bits), so if you need more than 7 decimal digits precision, Float64Array or DOMMatrix must be used.

Mikhail, wdyt => WontFix?
Cc: kkaluri@chromium.org
Labels: Needs-Feedback
Tested this issue on Windows 10 with chrome #57.0.2987.133, launched chrome and navigated to the test url in comment #0

Didn't see any output as mentioned as mentioned as actual & expected result in the comment #0, instead observed "ReferenceError: AbsoluteOrientationSensor is not defined" errors.

Attaching a screenshot for reference.

canx.cao@ Could you look into and let us know your observations.
Issue 709913.PNG
155 KB View Download
kkaluri@ do you have the "Generic Sensor" flag enabled?

Comment 4 by canx....@intel.com, Apr 18 2017

Mikhail@, please take look at https://bugs.chromium.org/p/chromium/issues/detail?id=709913#c1 ,
what do you think?
Project Member

Comment 5 by sheriffbot@chromium.org, Apr 18 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "kkaluri@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: WontFix (was: Unconfirmed)
 canx.cao@ think Alex is right, test for float32 should consider the type size.

Comment 7 by canx....@intel.com, May 9 2017

This issue cannot reproduce with chrome 60.0.3091.0(windows) and 60.0.3089.0(Android). Thanks!
Close.

Sign in to add a comment