Matthias Nehlsen

Software, Data, and Stuff

Distributed Atmospheric Pressure Measurement

Later this month, I'll be going on a hiking tour in the Alps around the Matterhorn. I do not recall exactly why I said yes to this tour; maybe because I did not know then that during the ten days we'd climb a combined total of 10,500 meters (roughly 34,500 feet). But on the other hand, that's an interesting challenge for a person with a sedentary job. Now, me being me, I would love to have a way to track the current altitude plus the combined ascent. GPS can help here, but the best sensor that's up to the task task appears to be a barometer.


GPS sensors only have an accuracy of ±45m in the vertical axis, which makes them less than ideal for measuring combined ascent unless readings are averaged over longer periods. However, averaging would not only alias the otherwise occurring zigzag lines from the measurement errors, but also the real ups and downs in the terrain that you actually want to measure. Though a barometer can capture these small changes much better, it is prone to a shift over the day as the atmospheric pressure changes with the weather. It appears that the averaged GPS readings, while not all that useful for capturing altitude changes in unknown terrain - could be used to correct the barometric height from time to time. When the barometric height deviates by more than 45m from the averaged GPS altitude, we know that a correction is due.

In addition to providing a higher resolution when continuously measuring altitude changes, a barometric sensor also consumes much less energy than a GPS sensor, which makes this sensor type particularly suitable for continuous monitoring.

Thinking about barometric sensors, I came across two articles (Forbes, 9to5mac) that stated that the upcoming iPhone 6 will have such a sensor. First of all, Apple, that's a little late for my tour. Can I get a prototype, please? Anyhow, I find pressure sensors in connected devices really exciting, even if the sensor won't be available for the upcoming tour yet.

I am not an expert in meteorology, but in my layman's understanding of the subject, atmospheric pressure changes are one of the most essential measurable phenomena that weather forecasts revolve around. This makes total sense when you think about it. Wind brings changes in the weather. Most of the clouds here in Hamburg where I live are not formed spontaneously above my apartment building but are blown there by the wind somewhere from the Atlantic Ocean. Wind is a manifestation of atmospheric pressure change. Let's assume that at my current location the atmospheric pressure is higher in the west and lower in the east. As air tends to go back to equilibrium, it flows from the high pressure field to the low pressure field, which I then perceive as west wind.

Have you ever noticed a gust of wind before an adverse weather event like a thunderstorm? Besides being the title of a song on Pharell's new album, this gust of wind a sudden change in pressure and I am pretty sure that would be measurable by a barometric sensor in a mobile device. Now imagine that all smart phones are equipped with such sensors that are constantly sending the current atmospheric pressure together with GPS coordinates. I really wonder what that would mean for the accuracy of weather forecasts. I suspect they would become more accurate as they would feed real-time data back into the models, which in turn would adjust predictions. But at the same time, I also wonder how one would process all that extra data, with millions of sensors that move instead of being installed at fixed places. I'm sure this will not make the predictive models simpler. There are all kinds of interesting questions around this. For example, how do you know if a sensor is on the ground? A sudden change in pressure can also be due to the smart phone holder getting into an elevator, in particular if the elevator is in a high-rise building. Maybe only sensor data from moving targets should be used. How about collecting that data when a turn-by-turn navigation app is used? Then the altitude of the reading is fairly predictable, namely a few feet above the street. And the altitude of that street is typically known and does not change.

I'm all for using such data when it can keep me from getting wet or otherwise affected by adverse weather conditions. However, I believe there should be open standards on how this data is transmitted. I understand that this data only makes sense with embedded GPS location that ought to be precise to be most valuable. But at the same time I am not okay with my device constantly leaking my location together with identifiable data. My device ID or any other information related to me is not necessary for the noble task of making weather forecasts better and as such should not be included. In German we have a word for this: Datensparsamkeit. Martin Fowler did a good job translating the concept into English. Just because we can store every piece of information we can get our hands on, it does not mean that that's always a great idea.

But with that being said, I find the idea of having millions of additional - and moving - sensors to measure changes in atmospheric pressure fascinating. This real-time data could prove just as useful for refining weather models as it is for improving navigation by getting traffic data from smart phones that move with their owners in their cars (or not in the case of a traffic jam). By the way, does anyone know what data exactly the devices send back for live traffic? Once again, there is a case to be made for an open standard for anonymized sensor data and Datensparsamkeit.

Until next time, Matthias

© 2022 Matthias Nehlsen