Re: [ambient-light] Mandate that illuminance readings be rounded; require threshold value check. (#77)

@anssiko @reillyeon @sandandsnow this is a companion to w3c/sensors#429

As mentioned there, AFAICS only specifying the granularity of the illuminance data is not enough, as the Chrome implementation also checks if the new reading differs from the latest one significantly enough, and IIRC @reillyeon mentioned only doing the rounding was not enough to avoid fingerprinting.

Opens I can see immediately:
* It is not clear if "at least 50lx" makes sense or if we should mandate 50lx specifically in the values above.
* It is also not clear if implementations should have leeway to specify different values for the "illuminance threshold value" and the "illuminance rounding multiple" (or if the values should depend on each other).
* The changes to the `illuminance` getter are probably too hand-wavy. I did not know whether the actual algorithm ([this](https://source.chromium.org/chromium/chromium/src/+/main:services/device/generic_sensor/platform_sensor_util.cc;l=36;drc=192c49dcb54d72febb3aeb8630ad2c8ba048bbd6) is what Chrome does at the moment) must be specified or not.
* Chrome does the rounding before notifying `Sensor` instances (e.g. the getter just calls "get value from latest readings") by storing raw readings but sharing rounded readings with instances, but I guess this is irrelevant from a spec perspective?
* The names for the new concepts and values are not great :-)

-- 
GitHub Notification of comment by rakuco
Please view or discuss this issue at https://github.com/w3c/ambient-light/pull/77#issuecomment-994953010 using your GitHub account


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

Received on Wednesday, 15 December 2021 16:26:09 UTC