-
Notifications
You must be signed in to change notification settings - Fork 59
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
Address questions around exposing high-level, low-level, and uncalibrated sensors #51
Comments
the problem I see with requesting different sensors is how do you correlate them? It's not evident they are the same underlying sensor. I think the best way is to consider that each sensor offers multiple variables, like "presure", "rawpresure", "altitude". This is the way we have modeled it in our system and works quite well. |
@pablochacin so you're suggesting something like: interface BarometerSensorReading : SensorReading {
readonly attribute double? pressure;
readonly attribute double? rawPressure;
readonly attribute double? altitude;
}; Doesn't that might have some performance cost in some circumstances? |
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.
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: readonly attribute double? altitude; What does this even mean? readonly attribute double? pressure;
readonly attribute double? rawPressure; |
Sorry, I meant "uncompensated" and not "uncalibrated" (please bear with me). So I was looking at the BMP series of barometer sensors (that are supported in Johnny-Five and which apparently also power the iPhone 6), and it appears that these sensors all have an integrated temperature sensor that is used to compensate the values of the pressure sensor and not (only?) to help calculate the altitude as you seem to indicate in #51 (comment). So I have a bunch of follow up questions:
Note, I'm taking |
@tobie In our current system, we model sensors as providing "maps" of variables. That is, the event don't have a single Regarding performance, the higher penalty is for the event meta data (time stamp, location, attributes) and for the connection/transmission overhead, more than for transferring a few more bytes of data. |
Yes, and I actually cannot identify a barometric pressure sensor that doesn't come with a temperature. I still think that these need to be treated as discrete sensors.
These are the only useful values that any program will care about. "Uncompensated" air pressure measurements are "wrong" air pressure measurements ;)
This is exactly what I was thinking. |
That's the plan here too. This is more about setting guidelines for concrete sensor implementations as to what to expose and why. |
Thanks for the comments, @rwaldron. Here's a bunch of proposed resolutions that I'd like to include in the extensibility section of the spec:
@rwaldron: I'd like to get your thoughts on the last point here. Furthermore, I think it would be useful to have a bunch of definitions in the spec for sensor-related terminology, e.g.: sensor fusion, calibration, compensation, etc. (now tracking in #52) and maybe some high level details as to how sensors are generally implemented (tracking in #53). |
I think this is properly addressed in the Extensibility section of the spec. Closing. |
For example, with Barometer, should an
Altimeter
sensor be exposed as part of the same spec?Similarly, how do we go about temperature-corrected Barometer data (these are often on the same chip)? Should the spec request both the
calibratedcompensated data (new BarometerSensor()
) and therawuncompensated data (new UncalibratedBarometerSensor()
new UncompensatedBarometerSensor()
??) to be exposed?The text was updated successfully, but these errors were encountered: