[sensors] Provide the DeviceOrientation sensor

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