W3C home > Mailing lists > Public > public-device-apis@w3.org > June 2015

Re: [sensors] Address questions around exposing high-level, low-level, and uncalibrated sensors

From: Rick Waldron via GitHub <sysbot+gh@w3.org>
Date: Tue, 16 Jun 2015 22:49:27 +0000
To: public-device-apis@w3.org
Message-ID: <issue_comment.created-112595749-1434494966-sysbot+gh@w3.org>
> Should the spec request both the calibrated data (new 
BarometerSensor()) and the raw data (new UncalibratedBarometerSensor()
 ??) to be exposed?

Uncalibrated data is wrong (or at least inaccurate) data. Whatever 
hardware is responsible for initializing each component to the sensor 
hub/bus should be responsible for calibration. 

> the problem I see with requesting different sensors is how do you 
correlate them? It's not evident they are the same underlying sensor.

Exactly. A Barometer sensor should output a measurement of ambient air
 pressure in either kPa or hPa. A Temperature sensor should output a 
measurement of Temperature in (at least) Celsius. These should always 
be treated as discrete components. Using the output of these 
particular discrete sensors, user code can compute Altitude from sea 
level (~1013.25 hPa). 


This assumes the host device has both sensors:

```webidl
readonly attribute double? altitude;
```

What does this even mean?

```webidl
readonly attribute double? pressure;
readonly attribute double? rawPressure;
```


`

-- 
GitHub Notif of comment by rwaldron
See https://github.com/w3c/sensors/issues/51#issuecomment-112595749
Received on Tuesday, 16 June 2015 22:49:29 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:54:05 UTC