W3C home > Mailing lists > Public > public-device-apis-log@w3.org > February 2017

[sensors] Provide the DeviceOrientation sensor

From: Mikhail Pozdnyakov via GitHub <sysbot+gh@w3.org>
Date: Fri, 17 Feb 2017 12:21:08 +0000
To: public-device-apis-log@w3.org
Message-ID: <issues.opened-208426225-1487334067-sysbot+gh@w3.org>
pozdnyakov has just created a new issue for 
https://github.com/w3c/sensors:

== Provide the DeviceOrientation sensor ==
At the moment developers experience problems when merging data from 
different motion sensors (which is required in most cases): sensor 
data updates come at the same time from HW but it is not quite obvious
 -- the user is dealing now with multiple sensor instances (gyro, 
accel, magnetometer), each with their onchange event.

So, it would be beneficial to have a new `DeviceOrientation` class 
providing the merged device orientation data in a convenient way with 
a single 'onchange' event. This was also discussed on a DAP call: 
https://lists.w3.org/Archives/Public/public-device-apis/2017Feb/0003.html

I would like to provide a solution for this and draft an API for such 
sensor. Please consider the following piece of IDL as a starting point
 for discussion:
```
interface DeviceOrientation : Sensor {
  /**
   * Populates the passed 16-element array with the orientation matrix
   */
   void getOrientation(Float32Array);
}
```


Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/170 using your GitHub account
Received on Friday, 17 February 2017 12:21:15 UTC

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