RE: Sensors simplified (or not)

+1

This works.
Thanks for the proposal.

Dzung Tran

-----Original Message-----
From: Max Froumentin [mailto:maxfro@opera.com] 
Sent: Thursday, February 11, 2010 01:39 AM
To: Tran, Dzung D
Cc: public-device-apis@w3.org
Subject: Re: Sensors simplified (or not)

On 10/02/2010 23:58, Tran, Dzung D wrote:
> I think this is simple and should work fairly well. Just a couple of
> questions/comments:
>
> So for Ambient Light Sensor, the value of 1.0 means direct sunlight
> and 0.0 means complete darkness. Is this your understanding?

Pretty much:

0 means the minimum value that the sensor can report. So yes, in this 
case, complete darkness, normally.

1 means the max mvalue that the sensor can report, not necessarily 
direct sunlight (whatever that means in terms of actual measurement),
but what the sensor considers full brightness.

> How would a programmer interpret these values when both existed such
> as 1.0 for normalized value and value = 79.9, max = 90.0, min = 0.0.

I didn't want to overexplain in my previous mail but what I thought was 
that:

Value can be null, or have a number value.
- If it is null, then min must be 0.0 and max must be 1.1 and normalized 
value must be a number between 0 and 1
- otherwise min is the min value in the specified unit, max is the max 
value and normalized value must be null.

What do you think?

Max.

Received on Thursday, 11 February 2010 17:22:27 UTC