[whatwg] Pressure API?

Ian Hickson ian at hixie.ch
Tue Jan 4 17:39:24 PST 2011

On Wed, 20 Oct 2010, Jens Müller wrote:
> now that device orientation, geolocation, camera etc. have been spec'ed: 
> Is there any intent to provide an API for pressure sensors?
> This might well be the next hip feature in smartphones ...
> Oh, and while we are at it: Humidity probably belongs to the same group.

I haven't added these features to the spec for now, since the use cases 
for it aren't that compelling and so it's probably best to wait a while 
longer, allowing browser vendors to implement more of the stuff we have 
already added.

On Wed, 20 Oct 2010, Rich Tibbett wrote:
> Could this be modeled as an extension [1] to the System Info API [2]?
> This spec is still at the working draft phase. Perhaps renaming it to 
> 'Generic Sensors API' and removing a whole bunch of the sensors included 
> in there at the moment would be appropriate.
> Getting and monitoring pressure and humidity within that framework would 
> work.
> [1] http://www.w3.org/TR/system-info-api/#extensibility
> [2] http://www.w3.org/TR/system-info-api

That doesn't really look like a Web spec... it doesn't really address 
privacy and security concerns (it just says browsers "must not retrieve 
or update system information to Web sites without the express permission 
of the user", which doesn't really give much of a chance for there to be 
a good user interface for this), and it's massively over-engineered for 
what it is (the API surface is bigger than <canvas>!).

It looks more like something one would use in walled-garden environments.

On Wed, 20 Oct 2010, Henri Sivonen wrote:
> Are there other use cases apart from guessing the altitude? It figuring 
> out the device altitude is the use case, shouldn't the API expose the 
> altitude and allow the altitude to be computed by the browser or by the 
> operating system from a pressure sensor, from GPS or both?


On Wed, 20 Oct 2010, Marshall Eubanks wrote:
> Having worked in meteorology, I can tell you that, if every cell phone 
> had a barometer attached, that data could and would be used to improve 
> "micro-forecasts" over densely populated regions. It should be possible 
> to track storm fronts and the like to the 100 meter level - imagine an 
> app that gave you a 1 minute warning on the need for an umbrella.
> I am not going to pass any judgement on how hip this would be, but those 
> are the uses I can see.

I think we're some way away from having many users run background Web apps 
on their mobile devices for this kind of thing! However, in the future 
this may become more realistic and that would be a good time to spec this.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list