W3C home > Mailing lists > Public > public-device-apis-log@w3.org > January 2018

Re: [sensors] Investigate possibility of synchronizing coordinate systems

From: Mikhail Pozdnyakov via GitHub <sysbot+gh@w3.org>
Date: Thu, 11 Jan 2018 11:02:46 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-356901407-1515668565-sysbot+gh@w3.org>
I'm not in favor of using `SensorOptions` for it, IMHO such API would be quite opaque (e.g. `function readDataFromSensor(sensor) { /* what coord system this sensor uses? */ }`

IMO it's simpler from both implementation and usage perspectives if sensors always stick to the device coord system, like it happens now. However we could provide some convenience conversion functions (or methods), like [they do on Android](https://developer.android.com/reference/android/hardware/SensorManager.html#remapCoordinateSystem(float[],%20int,%20int,%20float[])). 

For example, `OrientationSensor.remapCoordinateSystem(matrix, screenOrientation)`, where `matrix` is rotation matrix and `screenOrientation` is [screen orientation type](https://w3c.github.io/screen-orientation/#dom-orientationtype).

-- 
GitHub Notification of comment by pozdnyakov
Please view or discuss this issue at https://github.com/w3c/sensors/issues/257#issuecomment-356901407 using your GitHub account
Received on Thursday, 11 January 2018 11:02:51 UTC

This archive was generated by hypermail 2.4.0 : Monday, 4 July 2022 12:47:55 UTC