[proximity] Behavior of `distance` attribute when sensor cannot provide distance measurements? (#44)

andycarle has just created a new issue for https://github.com/w3c/proximity:

== Behavior of `distance` attribute when sensor cannot provide distance measurements? ==
Greetings!

I am a member of [Ecma TC53](https://www.ecma-international.org/technical-committees/tc53/), working on the draft specification of [ECMAScript Modules for Embedded Systems](https://ecmatc53.github.io/spec/web/spec.html).

As part of our work on Sensor Class Patterns, we are specifying APIs for common sensor types. Where possible, we are making these APIs compatible with the related W3C Sensor specifications. For example, this is the definition in our current draft for the [Proximity class](https://ecmatc53.github.io/spec/web/spec.html#-14-sensor-classes-proximity).

With that as background, I had a quick question on the intended implementation of the `distance` attribute of the ProximitySensor Interface. 

I understand that `distance` is the sensed distance between the device and the closest sensed object and that `distance` should be `null` if no object is detected. But, the [Introduction](https://w3c.github.io/proximity/#intro) notes: 

> "Moreover some proximity sensors might be only able to provide just a boolean to indicate if there is a physical object which is near, more like presence detection, than an absolute value for the distance."

What is the intended behavior of `distance` in this situation, where the sensor is only capable of a Boolean determination of object presence? Should `distance` be absent from the sensor instance? Or should it return a Boolean value (presumably the same value returned by `near`)? Or something else?

Thank you!
 - Andy

Please view or discuss this issue at https://github.com/w3c/proximity/issues/44 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 20 January 2021 09:28:04 UTC