Accelerometer reading inconsistencies

The specification says:

"A device lying flat on a horizontal surface with the screen upmost
has an acceleration of zero and the following value for
accelerationIncludingGravity: {x: 0, y: 0, z: 9.81}"

In iOS Safari this configuration returns the following values:

{x: 0, y: 0, z: -9.81}

Android-based browsers return {x: 0, y: 0, z: 9.81}.

Similarly, the spec says:

"A device is mounted in a vehicle, with the screen in a vertical
plane, the top uppermost and facing the rear of the vehicle. The
vehicle is travelling at speed v. The device records a positive x
component for both acceleration and accelerationIncludingGravity."

iOS Safari records a negative x component for both acceleration and
accelerationIncludingGravity  in this configuration while
Android-based browsers record a positive x component as per spec.

A good example of issues this inconsistency leads to can be found @
e.g. http://ariya.github.io/js/marblebox/. In iOS browsers the marbles
fall downwards. In Android-based browsers the marbles fall upwards.

Can we fix this?

Received on Wednesday, 16 July 2014 16:08:25 UTC