w3c / deviceorientation

W3C Device Orientation spec
https://www.w3.org/TR/orientation-event/
Other
49 stars 32 forks source link

Abstract away underlying sensors #180

Open marcoscaceres opened 1 month ago

marcoscaceres commented 1 month ago

The spec often talks about the underlying concrete sensors that are being used to provide the device orientation and motion. However, these sensors themselves are immaterial to the actual resulting events.

As such, it would be great if the spec could just abstract them away entirely.

reillyeon commented 1 month ago

Is this separate from the permission policy question?

I think the orientation and motion events are already as abstracted from the underlying sensors as is possible while still being well-defined.

That is, for example, the acceleration property of a DeviceMotionEvent implies the existence of an accelerometer. That's what a device which measures acceleration is called. It doesn't specify how the accelerometer works but if you have the ability to measure acceleration then you have something called an accelerometer. The same applies to "gyroscope". Even if it isn't constructed of concentric spinning rings it seems like the scientific community generally calls anything which can measure angular velocity a gyroscope. We could potentially rename "magnetometer" to "compass" if we want to focus the concept on determining heading or orientation on a spherical planet rather than measuring a magnetic field.

marcoscaceres commented 1 month ago

It's kinda tied to the policy question, as, for instance the spec says things like:

Relative device orientation is measured with an accelerometer and a gyroscope, and the reference coordinate system is arbitrary.

Which make these hard connections. That's not to say the above is not matter of fact, but then those become connected to policy.

Do you seen what I mean?