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

Issue 541607 link

Starred by 4 users

Issue metadata

Status: Fixed
Closed: Jan 2018
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Participants' hotlists:

Sign in to add a comment

devicemotion: rotationRate not implemented according to spec

Reported by, Oct 9 2015

Issue description

Steps to reproduce the problem:
1. On Chrome Mobile, go to
2. Rotate the device around the axis perpendicular to the screen (Z axis)
3. See that 'gamma' is changing
4. Rotate the device around its shorter side to side axis (X axis)
5. See that 'alpha' is changing
6. Rotate the device around its longer top to bottom axis (Y axis)
7. See that 'beta' is changing
8. Notice that in all three cases, the numbers reported are fairly small (around -10..10)

What is the expected behavior?
According to the W3C spec ( the rotation axes should be the following:

Z axis: alpha
X axis: beta
Y axis: gamma

Furthermore, the rotation rate should be reported in deg/s, whereas in the current version of Chrome, the value is in rad/s.

What went wrong?
- The axes are not assigned correctly.
- The values are not scaled correctly.

Did this work before? No 

Chrome version: 47.0.2526.6  Channel: dev
OS Version: 5.1.1; SM-N910W8 Build/LMY47X
Flash Version:

Comment 1 by, Oct 9 2015

Woops. The arch here is arm-v7.
Status: Available

Comment 3 by Deleted ...@, Oct 9 2015

Yeh questions prapt nahi kar Sakta isliye maine download kiya

Comment 4 by, Oct 12 2015

Labels: -Cr-Blink-JavaScript Cr-Blink

Comment 6 by, Apr 20 2016

Status: Assigned (was: Available)
laforge@, please create component:Blink>DeviceOrientation like Blink>Bluetooth
Status: Fixed (was: Assigned)
IO>DeviceOrientation created, IO>Bluetooth existed.
Status: Assigned (was: Fixed)
thanks laforge@
looks like the rotation rate comment could still apply will need to double-check, assigning to myself
Components: IO>DeviceOrientation
Components: -Blink
Components: -IO>DeviceOrientation Blink>Sensor
Components: -Blink>Sensor Blink>Sensor>DeviceOrientation
Jun and I recently rediscovered this issue. It is an easy fix however we should do a survey of other implementations to be sure that this behavior has not become the de facto standard given that this has been wrong since this feature was first implemented 4.5 years ago.
I did some testing on Chrome on Android, Firefox browser on Android, and Safari browser on iPhone, they all use:
X axis: alpha
Y axis: beta
Z axis: gamma

The difference is that Firefox browser and Safari browser use degrees, and Chrome uses radians.

Status: Started (was: Assigned)
Some updates:
1. For the rotation axes issue, I filed a DeviceOrientation Event spec issue to update the spec and created a pull request:

2. For the rotation rate issue, I posted an "Intent to Change" to change Chrome implementation to use deg/s instead of rad/s at:!topic/blink-dev/ple1o7bFqEs

Project Member

Comment 18 by, Jan 19 2018

The following revision refers to this bug:

commit b86cf40509d59742d8917fde6d03fe195a7432d8
Author: Jun Cai <>
Date: Fri Jan 19 17:29:02 2018

Change DeviceMotionEvent's DeviceRotationRate to use degrees

The DeviceMotionEvent spec:
says the DeviceMotionEvent's DeviceRotationRate "must be expressed in
degrees per second (deg/s)". This CL changes the implementation to be
the same as the spec.

Related post and discussion at blink-dev:!topic/blink-dev/ple1o7bFqEs

Bug:  541607 
Change-Id: I8cd5a8fadeebf49deb1126685d267495da7b4c3c
Commit-Queue: Jun Cai <>
Reviewed-by: Tim Volodine <>
Reviewed-by: Reilly Grant <>
Cr-Commit-Position: refs/heads/master@{#530549}

Status: Fixed (was: Started)

Sign in to add a comment