# Is it possible to calculating sea-level pressure with an unknown base station altitude?

I'm trying to program a BMP180 pressure/temperature sensor to calculate altitude. The method I've seen used is to input your current base station altitude to calculate the sea-level pressure. It seems a little tedious to input the base station altitude everytime, so I was wondering if it is possible to calculate sea-level pressure without a known base station pressure.

I've been trying to calculate sea-level pressure through iteration. I would set the default sea-level pressure at 1013.25 mb, use this number to calculate an estimated altitude, use the estimated altitude as my current base-station altitude to calculate a new sea-level pressure, use this new number to calculate an estimated altitude, etc... However, I noticed that my results are diverging. Is there a better way to calculate the sea-level pressure?

• Which information is available to you in this calculation? – hmakholm left over Monica Sep 1 '14 at 18:17
• I can measure temperature and pressure directly, those are the only two pieces of information available – user2218339 Sep 1 '14 at 18:18
• Then you have no way of distinguishing between being at sea level in a low-pressure area, or up in the hills in a high-pressure area. – hmakholm left over Monica Sep 1 '14 at 18:23
• Yes, that was why I was trying to calculate sea-level pressure through iteration, hoping that it will converge to a number. I guess I will either have to stick with relative altitude or input a known base-station pressure – user2218339 Sep 1 '14 at 18:26
• Since your measured inputs in the two cases would be exactly the same, you have no hope of distinguishing them through calculation, iterated or otherwise. – hmakholm left over Monica Sep 1 '14 at 18:27

Calculating sea level pressure depends on knowing your altitude. A function that does this is the hypsometric equation $$\Delta z = \dfrac{R \overline{T}}{g}\ln\dfrac{p_1}{p_2}.$$ This function gives the depth ($\Delta z$) of an atomspheric layer with average temperature $\overline{T}$ between pressure levels $p_1$ and $p_2$. In your case, the station pressure is known and the height of mean sea level is known; in order to calculate your height or to calculate sea level pressure, you must know the other quantity. The average temperature is also an unknown, but you can approximate this or use a value based on the lapse rate of the standard atmosphere.