-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local coordinates could use further detail/examples #19
Comments
We discussed whether to add more examples of device classes to the spec beside a typical mobile device. Since we cannot anticipate all future form factors some of them would always be implementation dependent, as you note. The current normative prose states "local coordinate system defined by the device" that is to say it is implementation dependent, and mirrors the conventions of each platform and its corresponding underlying APIs. The currently shipping Device Orientation API is similarly vague in this respect. We'll clarify https://w3c.github.io/magnetometer/#local-coordinate-system along those lines, when we figure out exactly what type of text would be helpful. Our primary focus has been to enable this API on mobile devices first, so we haven't explored alternative classes of devices in detail yet. |
Regarding the orientation question, based on the text in the spec, it seems like a mobile device implementing a compass would need to listen to Device Orientation to know how to translate inputs from the sensor onto the orientation of the rendering. Sample code illustrating this might be helpful. |
Thanks for the feedback @mfoltzgoogle, sorry that it took so long to respond.
The hardware sensor has predefined axes, and as such, if the screen orientation changes, the axes won't, since the physical assembly of the sensor does not change on screen orientation change. We will investigate this further in w3c/sensors#257 from the API ergonomics point of view, this is a generic issue, tagged as Level 2.
In this form factor it will be most probably like in the mobile device form factor, defined by the manufacturer of the smart watch, z pointing upwards from the screen etc.
Yes, this is implementation dependent. This is the reason we use "a device that hosts the sensor" language in related specs.
Similarly in scope for w3c/sensors#257 I will close this issue now, but should you have any further comments we can open this issue again. |
It's not clear what local coordinates means for:
[1] https://www.adafruit.com/product/2021
The text was updated successfully, but these errors were encountered: