Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Use Markdown for this comment
Set severity, which reflects how much the issue affects the use of the product
Change issue status back to 'Assigned'
Pending code changes (auto-populated)
[ID: 84651]
[ID: 85206]
Set the version(s) of the product affected by this issue (comma-separated list)
Set the version(s) of the product in which the issue should be fixed (comma-separated list)
Set the version(s) of the product in which the issue fix was verified (comma-separated list)
Set if this issue occurs in production
Set Reporter
Set Type
Set priority, which reflects how soon the issue should be fixed
Set Status
Set Assignee
Set Verifier
Remove item
View or edit staffing
View issue level access limits(Press Alt + Right arrow for more information)
Description
#1There appears to be what amounts to a bug (or very unhelpful feature) in mobile Chrome browser related to device motion. When retrieving data in a mobile browser from the device sensors (eg accelerometer) using javascript in google chrome mobile, the data is rounded to only about two significant digits, making it nearly unusable for many purposes, though the raw device data is far more accurate than this. No idea why. I presume that the browser must be rounding it, perhaps out of security concerns? The same code does not produce this behavior on mobile safari or on Samsung mobile internet browser.
How can you get the full-resolution sensor data?
Example code that produces rounded data:
window.addEventListener("devicemotion", handleMotionEvent, true);
handleMotionEvent: function(event) {
result = event.acceleration.x;
// do something with result. Result datapoints will be, eg: 3.200000004, 3.4000000....
}
Using the api elements like this produces the same behavior:
accelerometer = new Accelerometer({ referenceFrame: 'device' });
Thank you