W3C home > Mailing lists > Public > public-device-apis@w3.org > March 2012

Sensor API feedback: OrientationData

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 2 Mar 2012 13:32:12 +0100
Message-ID: <CA+c2ei_qrAm4SUbwXxt1j97LdQ=3DiV7fKkB+ZKrOUVewYtXvg@mail.gmail.com>
To: public-device-apis@w3.org
Hi All,

I'm having trouble understanding the difference between the
OrientationData and AccelerationData sensors.

Unless you break the laws of physics, it's impossible to tell the
difference between gravity and acceleration. So it seems that the
OrientationData is simply a result of applying some trigonometry to
the result of the acceleration sensor. Is this the case? I.e. is the
OrientationData sensor simply a convenience function on top of the
AccelerationData sensor?

This would be more useful if you could attach a watch threshold on
non-numeric sensors. I.e. if you could say that you wanted to add a
watch threshold that notified you when the device was leaning more
than 10 degrees. But that isn't currently the case.

I'm fine with keeping the sensor as a convenience function, but if so
we should call it out that that's what it is. I.e. that it's simply
returning the results of applying some trigonometry to the
acceleration sensor.

Finally, I don't understand how the orientation can be 3 angles. I
would have expected 2. Could someone explain the meaning of the alpha,
beta and gamma values?

/ Jonas
Received on Friday, 2 March 2012 12:33:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:32:34 UTC