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

RE: Sensor API feedback: OrientationData

From: Tran, Dzung D <dzung.d.tran@intel.com>
Date: Fri, 2 Mar 2012 15:22:23 +0000
To: Jonas Sicking <jonas@sicking.cc>, "public-device-apis@w3.org" <public-device-apis@w3.org>
Message-ID: <84BCA539DD96614691177EDA3CE4FF053B822137@ORSMSX101.amr.corp.intel.com>
This is how I understand it.

Yes, OrientationData is applying the rotationmatrix to AccelerationData. Rotationmatrix is calculated over time using GyroData. OrientationData is Yaw, Pitch, Roll in term of degree or radian; while AccelerationData is raw acceleration in m/s^2. 

The original thought was to have OrientationData here for completeness, but it already cover under the DeviceOrientation Event Spec, so maybe we should remove it from the Sensor API spec.

/Tran



-----Original Message-----
From: Jonas Sicking [mailto:jonas@sicking.cc] 
Sent: Friday, March 02, 2012 4:32 AM
To: public-device-apis@w3.org
Subject: Sensor API feedback: OrientationData

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 15:23:58 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:53:52 UTC