Shared publicly  - 
I've seen a lot of hay made about the barometer in Galaxy Nexus. Here's the skinny; it's not really as dramatic or weird as people think.

The primary purpose of the barometer is (at least, I've been told) to make GPS lockons faster. Locking on to a GPS involves numerically solving a 4-dimensional set of linear equations -- 3 dimensions in space, and time. (Yes, you get accurate time for free if you lock on to GPS.) Because of the way GPS works, this can take a few minutes.

This goes much faster if you already have an estimate of your location. This is why "aGPS" (assisted GPS) services are so popular: by starting with a rough city-level coordinate fix through something like cell-tower network location, you can reduce the amount of math you have to do to lock on. This is where the barometer comes in.

The 3 dimensions in space are latitude, longitude... and altitude. The barometer gives you a reasonable first-cut estimate for altitude. This gives you a bit of a leg up on one of the dimensions -- especially combined with "2D" aGPS -- which can help speed up lock-on in general.

Now of course, the barometer can also be used for things like, well, determining atmospheric pressure (although I'm not sure it's really weather grade.) But the main reason it's in your phone is to help with GPS.

Also, it's worth noting that Xoom has a barometer too, so it's not a new thing.
Brian Haner's profile photoTim Moore's profile photoKeyan Mobli's profile photoSimon Jones's profile photo
How about crowd sourcing the (however inaccurate) barometric readings for some interesting data modeling that meteorologists could use?
Data always has a use - you just have to find it :)
Great info, but I don't yet think of the Xoom as old in any respect of the word. Just sayin'.
Barometer = Altimeter (once its calibrated)
Thanks for taking the time to explain! I must admit I was confused! :-) 
Now I finally understand why XOOM has it...
I had no idea it helps with GPS. Thanks for that!
Always thought it was strange to have a Barometer in my Xoom, but not a Hygrometer or Thermometer. Now I know why
My hiking GPSes, even some old watches I have owned have contained barometer for altitude reference. They really opened up a new world of fun bushwacking in the mountains (I layer learned this to be 'orienteering'). I look forward to seeing how this is used by developers. 
+Brendan Wreford - You know that, and I know that, but your question was about why so many other people seemed to think it was weird.... ;)
Galaxy Nexus (and Xoom)'s barometer is absolutely fine for weather forecast. Altitude differences have an accuracy of about 3 feet.
High-power rocketry folks will note that the typical consumer-grade GPS chip shuts down above 500 mph OR 60,000 ft MSL, making it useless for avionics. (The feds are concerned that gps + rocket = guided missile, so they enforce this limitation on chipset vendors. Technically, the requirement is an "AND," but most vendors implement it as "OR.") But a barometer doesn't have such limitations, so you should be able to use a Galaxy Nexus as a parachute deployment computer, even if it can't do guidance. :)

We're sticking one in my avionics bay at the October Skies launch outside Fresno next weekend, so we'll see how well it works. If we get good data out of it, I want to try using it in place of a standard flight computer.
It would be nice if the barometer could also be configured. As any pilot can tell you, the air pressure changes from day to day and hour to hour. The QNH (air pressure adjusted to sea level) is broadcast by the nearest ATIS (Air Traffic Information Service). If the phone's internal barometer can pick up the QNH from the local ATIS, often streamed online as well as over the air (at least I think so), then a more accurate alt could be achieved and could even assist in recording of tracks with the GPS?

I have AIX Weather widget installed on my phone. It gives me the MSLP (Mean Sea Level Pressure) which is essentially the same as QNH.
I was glad to see that my yet unreleased barometer app for the Xoom worked "out of the box" in ICS. But one question: is it possible to emulate barometer acitivity in the emulator? If so, how?
Something I don't get. When its windy, the atmospheric pressure is different right? So in a tornado, that reading should be bonkers. That means the altitude obtained from the calibration should also be off right? So how does that bit work?
+Eshwar Venkanna Andhavarapu In a tornado, it would be difficult to get a clear "view" of the satellites too, no? Since it would be quite overcast with dense cloud? Then, i suppose, alternative means are used to acquire GPS. Just my thinking...
This doesn't seem to be the simplest or most reliable way to find approximate altitude. Why not just augment the aGPS database with altitude information for each cell tower and/or Wifi hotspots? Once you know the approximate 2D position from aGPS, you would just average the altitudes for cell towers / hotspots around you -- and/or calculate altitude directly, given enough cell towers / hotspots around you with different enough individual altitudes (so that the triangulation can proceed directly in 3D, assuming the inverse square law).
+Luke Hutchison, one issue is that you don't get a lot of vertical diversity in triangulation using ground-based objects, so your vertical angles are pretty acute. Also, most location techniques that use wifi just match signal strengths against a pre-sampled location map, gathered by a vehicle driving down the street, so there's no vertical knowledge in that map. There's no way to "triangulate" against a wifi AP as the timing is just too sloppy and signal strength is not a usable indicator of range. Also, nobody knows exactly where the access points are, including the APs themselves.

(If it's not obvious, I spent way too much of my life trying to get a non-GPS geolocation system working.)

The baro chips typically include a thermometer, so they can at least compensate for temperature effects, if not pressure fronts. They're certainly close enough for many uses, especially for relative measurements.

Besides, most of the time, the best guess is just "ground level" from a topo map. :)
@Dan: Are you sure about the time setting? [Yes, you get accurate time for free if you lock on to GPS.]

I wonder because - at least in Germany - a number of providers do not send time signals via network and since Android 2.x devices do not allow rootless time setting via an app (like Clocksync or similar) you have to do that MANUALLY (actually quite often because the clock in my Nexus S is considerably off after a few weeks).

GPS-derived time would be a welcome fix for that if that is really the case.
+Casey Barker That's cool and all (using a topographical map to base on the vertical on the GPS). However, being in the air a fair amount of the time, It'd really be nice if there was a bit more accuracy with regard to actual altitude.

I use the My Tracks app to record my local flights ( examples: ). When I do this, the Alt info is usually out by a few dozen feet. Now I know I'm just one person, but even so, can having more accurate altitude info really be all that bad? Especially when it comes to the whole reason for having the barometer in the device (to achieve a faster GPS acquisition)?
Guys the barometer is an Absolute pressure gauge where absolute pressure is zero-referenced against a perfect vacuum.

So you can have readings of the actual atmosperic pressure at the time.
With this and with corellation to the standard barometric pressure of the local place where is at zero altitude you can calculate altitudes.This is how the altitude works is a absolute pressure gauge that you put the standard pressure of the airport (So as to know where the zero altitude is and you guide the airplane with it for example)

So at phones you can do a lot of great stuff.
1)Calculate altitude obviously....
2)Check for the variations of the barometric on accordance to weather.
I thought this was going to tell me how high I was. This is of no use to me in a bar then?
Off course not in a tornado the atmosperic pressure can be very low although you are standing on the ground.So the barometer will tell you that you are at 200- ft altitude and you are at 0
Erm, I'm pretty sure aGPS doesn't work as you describe. It actually gets a faster fix by download the GPS almanac (i.e. locations of the satellites and other details) from the network, rather than slowly receiving it from the satellites. And probably the reason for the barometer (other than "more sensors; yeay!") is that GPS has pretty bad altitude accuracy due to the geometry of the triangulation.

I could be wrong, but it might be good to double check before this gets thrown around the internet...
I do trail tracking when mountain biking on my old Nokia E72 and the biggest problem I have is the altitude accuracy. It's typically out by 100s of feet and has many wild spikes. The tracks are still okay, but estimates of climb and descent are screwed entirely, as with the altitude graphs which show me to be flying somewhere way off the ground or buried deep within. I'd be very interested in a barometer equipped GPS phone. Didn't realise the Xoom has one, but would be very interested in the Nexus if it greatly improves altitude accuracy.
with regards to location apps, could this also help determine what floor you're on in a building?
I would love to make/see a skydiving app. I don't know how well it would work since it is not "weather grade". But it would be a great excuse to take the device to 14,000 feet.
Why dont you just set the approximate height directly from an approximate location (city) (next cellphone tower ) and solve it iteratively from there?
Especially @ +Jonathan Templer : I guess people grossly overestimate the accuracy of barometric height mesurement. There is a special problem involved: called weather. Since barometric presure is changing every day it is very hard to determine a height from pressure alone. The only way is to calibrate the altimeter using a know height and then work from there. Although I guess one could use weather data via an internet connection to compare the pressure from the device with an official value. Then one would get a rough idea of height. Perhaps this is what they are doing.
Well...if it's to help with GPS (I'm guessing with the "Z" or altitude factor) why wouldn't it be usable for altitude?
"Yes, you get accurate time for free if you lock on to GPS"

Do you really? I ask since in Android (up to at least version 2.3) you don't. Not with GPS, not any other way. Getting accurate time to my android phone has been a complete farce. For more details, see the comments on this issue and the documentation that goes with the "ClockSync" app that tries hard to work around this:

I'm not willing to root my phone to move the system time 20 seconds, so I'm stuck with inaccuracies.

Comment #15 addresses specifically why the phone doesn't get accurate time from GPS.

Is this post actually an indication that something has changed about the time issue?
Surely it's a help. From what I've read good dedicated GPS devices just have more accurate altitude due to the barometer. so you'd think a phone with it would too. It's still not perfect, due to weather changes and if you're moving a lot you get pressure changes just through motion. But has to be better than the basic fix off the satellites. Altitude is far less accurate than the long/lat position with GPS (at least consumer grade).
Well that's what I wrote, did i not?

+Anthony Steele Yes. Issue 4581 is very, very annoying especially since it would be so simple to fix and since it touches such a basic function as accurate time.
Forget the barometer, why don't you add in a Geiger Counter? Least then you Google could start crowd sourcing radiation at airports!
Is Google collecting the responses to this feature? They could use it to gauge reactions. A sort of barometer barometer.
Re: Is the barometer weather grade?
I wrote a reasonably popular Android app for glider pilots (called Gaggle). One of the features of that app is to use the barometer as an altimeter & vario. From user reports it seems to be very accurate - approximately the same as certified aviation altimeters.
+Felix Berthelmann +Anthony Steele I should have said "the GPS chip gets time for free". Whether a given device's software is configured so that it actually reads the time from the GPS chip varies from device to device and from chip to chip. For phones it wouldn't surprise me if the devices aren't set up for it, since you only get accurate time from GPS when you actually have a fix, which is infrequent enough that it may not be worth the effort to bother to hook it up to software.
+Brian Haley hehe I don't doubt for a moment that they don't have plans for that information.
Yeah, one of the reasons I want a GPS is so I can always have the correct time. GPSDrive comes with a daemon for doing's nice.
Unfortunately the effects are sadly temporary. (mehme memmormehmey)
GPS on phones gets used (in my experience) every few days. This is more than frequent enough to stop the clock drift that ends up with a phone clock a few minutes out after a few months.

Does this really "vary from device to device"? I don't know of any consumer android phones where the hardware allows time to be set from the GPS so it looks uniform. And sadly the OS doesn't allow it either.
This is a great feature. This should drastically improve the accuracy of indoor locations (in most cases) and as a benefit be able to calculate information such as the specific building floor you are on. Of course more testing is required so it looks like I will have to buy a nexus, you know, for science.
+Luke Hutchison +Casey Barker I've also worked on a lot of non-GPS location systems and it turns out that the best solution is often a combination of many technologies. Cell companies reduce the towers to get the minimum overlap coverage possible so for the most part you won't have enough towers to calculate height that will be more accurate than a 2D+topo. With the barometer you reduce the requirement for cell towers and also the GPS coverage. This should mean better indoor coverage for location and faster location fixes.
Does the Galaxy Nexus support GLONASS?
+Jim Sher Don't get me wrong -- altitude is great to know. I was just listing the technical reasons that you can't get it from triangulation against wifi or cells. You need a barometer and/or GPS to get it.
+john carpenter barometer will be utterly useless inside due to the fluctuating barometric pressure inside air conditioned spaces (inside will usually not be at equilibrium with outside, excepting very briefly upon entering and exiting). I really don't see this feature as being able to help in the 4 dimensional equation, given the variability of barometric pressure ...

Useful for short term weather prediction, yes (if you know what patterns to look for); useful for altitude, that is a huge maybe and more likely not so much...

As I said: there is NO way to determine a floor number unless one would calibrate the device to the pressure on floor 1 for example. One way to do that would be to consult a weather service.

But still air conditioning will play havoc with the altitude measurement.
+Jim Sher I assume you're flying small planes. Presumably cabin pressurization would seriously affect barometer-based altitude estimates on commercial flights. (Then again, you won't get a good GPS fix on commercial flights either due to the amount of metal in the way...)
+Stephen Knipe Pressure different due to HVAC systems in a building you can still get a height reading to +/- 1-3m sketchy for exact floors but generally fairly good results. I have some papers I can show you that have tested this result but they likely won't be the same sensor of the Nexus.

Even without the absolute barometric reference, barometers can give an altitude variance which is used to stabilize the calculations. This minimizes the time that it takes to get a GPS fix because it narrows where the calculations have to "search" for it.
Does aGPS use last known location as a starting point? Also, can somebody please explain in more technical terms exactly why "narrowing where the calculations have to 'search' for a GPS fix" speeds things up?
+Luke Hutchison Sure I'll do my best. Basically GPS works by triangulation. Knowing where the satellites are and measuring the distances to those satellites you can work backwards and calculate your position. However in practice it isn't that easy. First, the location of the satellites is calculated by a formula and it isn't always exact (a couple 100m out usually). So without knowing more information your GPS has to take iterative guesses at exactly how far the satellites are. And they have to do this for all the satellites that are currently available. So the "search" is essentially looking for the mathematical point that reduces the measurement error to each satellite. This process is the reason for slow GPS fixes and inaccurate readings.

AGPS (assisted) works in a couple of ways, but a common way is to provide a correction to the satellite position allowing you to have a better measure. This means the search for that point starts with a much smaller area.

Once you have a GPS location, your search is much easier. You only provide delta corrections based on whatever information you get. The Kalman Filter is one of the great algorithms that help this out. Any other sources, like barometer in this case, can help improve the location especially where a GPS signal is weak or unavailable.
+Eshwar Venkanna Andhavarapu Wind is caused by air shifting from high to low pressure areas. It has no effect on a "perfect" barometer (shielding makes the difference here). A barometer works like a submarine being crushed by water pressure in the ocean. As pressure increases, you can measure it. Since the barometer measurement is based on a perfect vacuum, you can correlate that information with currently known Mean Sea-Level (MSL) pressure readings to find altitude.

This is not perfect, obviously, since local and Mean Sea-Level pressure changes based on various circumstances (weather included). However, Using it in 4-D GPS calculations makes perfect sense. All it does is help shrink the search box for the local satellite.
what about help finding the location by typing in google maps streetnames?
+Kevin Peno +John Carpenter I still don't get it, there are usually around 6-7 GPS satellites visible at any given time from what I remember -- so an error of 200m in any of them shouldn't cause a problem with triangulating your position. Plus, most people probably forget that before aGPS, getting a GPS fix could take five minutes. You couldn't even get a fix within 200m instantaneously. Something else is going on.
+Luke Hutchison, based on your level of education, I sincerely doubt that I can provide an answer that would resolve your curiosity. So, I respectfully bow out of this discussion. I did however find someone new to follow :)
Oh well, looks like everybody thinks barometers give you a faster GPS fix now...
Altimeters have to be calibrated to a known altitude at the current pressure. The only thing they otherwise know is current barometric pressure and could track changes in pressure. I cannot see how this could possibly assist GPS altitude in any way. 
A temperature sensor would have also been great.
+Luke Hutchison I think GPS plans for a worldwide coverage of 6-7 sats everywhere but that frequently falls off when you use GPS indoor or areas with tall buildings around. In addition, multipath, where the GPS signal is reflected and arrives at the receiver much later can contribute to many large errors if they aren't removed. The 200m error can be substantial because it can't be predetermined which signal is producing a bad result. Adding errors from many signals can give you massive errors.

To get around this GPS samples many measurements and iteratively solves a system of equations with many unknowns. So knowing how much a specific variable can change makes it iterate faster and requires fewer measurements. This is what the barometer does, if you take the pressure from the first epoch and compare it to the second you get a way to measure the variability on the altitude axis. It essentially stabilizes one part of the equation to be solved. So you can get the result by calibrating from the first measurement to every subsequent one.

It would be interesting to measure the impact of the barometric corrections on GPS fix time. The SDK shows that you can get direct access to the sensor so I think we could probably run a simple series of tests to measure it. Now to convince someone to send me a device.
+Luke Hutchison See for a description of A-GPS. The GPS receiver needs almanac data for the satellite positions. With ordinary GPS it downloads this data from the satellites themselves but this is slow and any data loss while it is downloading can result in very long fix times. With A-GPS the almanac data is downloaded across the cellphone network or by wifi so it takes much less time to find out where the satellites are. Other factors such as getting a more accurate initial location then apply and can be helped from A-GPS (see the link) but the almanac data is probably the biggest difference between unassisted and assisted GPS. The barometer, I think, is all about improving fix times against other A-GPS systems, if you have no initial data and no network connection then your GPS fix time will still suck.
Based on what I know of GPS, I really don't think the barometer will useful for improving TTFF by the method stated. aGPS doesn't work by 'searching' around a coarse location - the search space is too large (you're trying to calculate multiple psuedoranges using a signal of wavelength 19cm / 7.5"). The 'reference position' described in the wiki is for the base station i.e. a known location.
The barometer would be useful for determining relative altitude and rate of change, as many other commenters have noted.
Okay does the location system after getting the rough fix and while updating the almanac then check the local weather for the pressure? We do have high and low pressure weather systems people and it doesn't take a tornado to cause enough of a pressure drop to throw off your altitude.
Now what it should let you do is solve for height with only three locks instead of four which may help. Google should throw an IR blaster and thermometer in the next one. Add the thermometer to the camera so you can snap a picture and then see the temperature of every pixel :)
Is it just me or does the latest cell phones seem like an ideal drone controller platform? They have GPS, gyros, accelerometers, access to a data network, high resolution imaging, and now a barometer.
Does anybody know more specifications about this barometer: hardware details like accuracy for example.
This might be interesting to build a vario application for free flight pilots! :-D Ideal as backup for the real devices
Honestly, I am a bit confused about the explanation given in this article: does knowing the current altitude really help improve GPS quality in terms of time to get a satellite fix? Well, beside the fact that there are far better means of getting a rough estimate of your current position using aGPS (i.e. using the current mobile network to determine where we are), i think the main point is that normally one can assume the user is in a range between 0meters to 2000meters altitude, or within a range of 2km vertically.

The next thing is that you need to have a reference value, or your estimated altitude will be wrong by several hundred meters. I have barometers in my outdoor devices, but you always have to adjust them to any kind of reference altitude, since air pressure changes dramatically as the weather changes. So without a good reference, the altitude estimated by the device will not be very precise.

If you now think that we are talking about satellites that are several hundred or thousand kilometers away in space, and we assume that we already know that the user is on or near the surface of the earth, which maybe alters by +/- one kilometer, depending on the current altitude, and compare that to a slightly more exact altitude which may be correct by +/- 100 meters or less, is that really a significatn gain to improve getting a satellite fix? I don't think so, but maybe you can give us a link with some more detailed explanation. Thanks.
Add a comment...