Closed Bug 705009 Opened 13 years ago Closed 13 years ago

DeviceMotion accelerationIncludingGravity values are in units of "G"s

Categories

(Core :: DOM: Events, defect)

ARM
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: cjones, Assigned: cjones)

References

()

Details

Attachments

(1 file)

The current spec says they should be in units of m/s^2, but they're currently reported as fractional multiples of 1G.  I'm not sure what happens on other platforms.  We should do what the spec says.
Assignee: nobody → jones.chris.g
Attachment #576649 - Flags: review?(doug.turner)
Comment on attachment 576649 [details] [diff] [review]
Report DeviceMotion values in units of m/s^2, not Gs, per current spec

Review of attachment 576649 [details] [diff] [review]:
-----------------------------------------------------------------

this is fine, thanks!  could you also make sure that the absolute property of DeviceOrientationEvent is |true|?
Attachment #576649 - Flags: review?(doug.turner) → review+
It's set to true unconditionally at http://mxr.mozilla.org/mozilla-central/source/dom/system/nsDeviceMotion.cpp#275, the only site I found.  I don't know whether the data is absolute per spec or not.
https://hg.mozilla.org/mozilla-central/rev/601d585e1e35
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: