1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Latitude & longitude & air pressure

  1. May 22, 2013 #1
    Hi there,

    I have a peculiar question. Imagine that you are in a earth position, obtained by google, that gives you the latitude and longitude. Those values are given in the decimal notation (ex: lat=20.44 ; long=-8.5).

    Now imagine that you want to know the air pressure in your position. So, you will get it from metar statios (metereologic stations along the countries). If you visit the three closer metar stations, you won't be able to do
    , because the air pressure in the metar station that is closer from your position has more weight to the calculus of the final air Pressure in you position.

    I also know the latitude and longitude of the three metar stations and I also know the distance between my position and those stations.

    How can I calculate the pressure in my position based on weights?


  2. jcsd
  3. May 22, 2013 #2
    I suppose you could weight the pressure measurements by the great circle distance from your position.

    [itex]P = \frac{D_1P_1 + D_2P_2 + D_3P_3 }{D_1 + D_2 + D_3}[/itex]
  4. May 22, 2013 #3


    User Avatar
    Gold Member

    Another method would be to assume the pressure follows a linear function from one station to the another. You can model it as 3 points, a,b,c forming a plane , with coordinates x and y being the latitude and longtitude, and z being the air pressure. Your air pressure would be the value of z at a point lying on the plane.

    So if you remember your early geometry days, of where a line perpendicular to the x-y plane ( at your coordinates ) intersects a plane formed by points a, b,c you could do it that way.
  5. May 23, 2013 #4


    User Avatar
    Science Advisor
    Homework Helper
    Gold Member

    and just hope there isn't something like a weather front between you and some of the stations.
  6. May 23, 2013 #5
    , can I use the decimal values of latitude and longitude to x and y ? Or should I convert them to another value?
  7. May 23, 2013 #6
    You are giving the greatest weightage to the station which is farthest away. How would that work?!
  8. May 23, 2013 #7
    I can suggest quadratic interpolation. Set the origin at your current location and assume that the pressure is given by [itex]p=a_1 + a_2d + a_3d^2. [/itex], where [itex]d=\sqrt(x^2+y^2)[/itex]. Plug in the values of d at the three locations to get the values of the three constants. The value of [itex]a_1[/itex] would be the pressure at your location.
    A really good calculation would need to correctly incorporate the variation of pressure with temperature and altitude though.
    Why not just get a barometer? Cheaper than a GPS device.
    Last edited: May 23, 2013
  9. May 23, 2013 #8
    Absolutly true
  10. May 23, 2013 #9
    What is x and y ? decimal latitude and longitude? Or can D be the distances that I'v already calculated?
    Last edited: May 23, 2013
  11. May 23, 2013 #10
    d is the distance along the surface of the earth(taken at the same altitude) of these stations. If you assume the earth as a sphere, you can approximately get x and y by [itex]x=(Rcos\theta_2)\phi_2-(Rcos\theta_1)\phi_1[/itex] and [itex]y=R(\theta_2-\theta_1)[/itex] . Where the subscripts 2 and 1 indicate respectively the station and your location. θ and [itex]\phi[/itex] are the latitudes and longitudes respectively. If you assume the earth as an ellipsoid(more accurate) these calculations would be more complex. The expression for calculating distance [itex]d=\sqrt(x^2+y^2)[/itex] assumes that the points are close enough that you can neglect the curvature of the earth. If not, then you would have to actually find the distance along the geodesic connecting the two points.
    Last edited: May 23, 2013
  12. May 23, 2013 #11

    my apologies

    This should be better

    [itex]P =\left( \frac{P_1}{D_1} + \frac{P_2}{D_2} + \frac{P_3}{D_3}\right)\frac{1}{\frac{1}{D_1} + \frac{1}{D_2} + \frac{1}{D_3} } = \frac{D_2 D_3 P_1 + D_1 D_3 P_2 + D_1 D_2 P_3}{D_2 D_3 + D_1 D_3 + D_1 D_2 }[/itex]
  13. May 23, 2013 #12
    There is a problem with this technique. Consider what happens if two stations have similar values of [itex]d[/itex] but are geographically separated and have different pressure. One could end up with unreasonably large or small values of [itex]a_1[/itex]. See the attached picture for an example.

    I think that the method employed should only generate pressures that are between the pressures given by the stations.

    Attached Files:

    Last edited: May 23, 2013
  14. May 23, 2013 #13

    What if the three locations are equidistant from you but with different pressures?
    Our almost equidistant and with different pressures? You can get VERY strange results.

    Edit: oops MisterX beat me to it
  15. May 23, 2013 #14
    Quite true. This would lead to an inconsistency(many valued). Isotropy cannot be assumed in general.
    Actually, if you assume everything is at the same altitude, we can assume an equation like this:
    [itex] p = a + bx + cy [/itex] for the purpose of interpolation.
    If the altitudes are different, the z direction would need to be factored in as well.
    The right way to model this really would be to take into account the physics and other factors like temperature.
    Last edited: May 23, 2013
  16. May 23, 2013 #15
    Even pilots don't need this kind of accuracy...
    The differences in the values that will be obtained will be neligible.
    Just use the data from the closest station.
  17. May 23, 2013 #16


    User Avatar
    Gold Member

    Yes you can use latitude-longitude values.

    the basic equation of a plane is Ax + By +Cz + D = 0
    what you would be doing is finding the equation of a graph relating air pressure ( z) with the location ( x and y )

    How to find the plane with 3 points.

    the x and y are your latitude and longtitude.
    the z is your air pressure.

    then when you have found your equation substute x and y for your own location to give you your z which is your air pressure.

    As I stated before, this assumes a linear location-pressure relationship, so if the stations are not too far apart that asumption may be true.

    Qnce you have your equation you do all sorts of things with it, such as change of pressure with direction, direction of maximum change, ie directional derivatives, gradient, it could become useful depending on what your plan is.
    knowing dot cross product, analytical geometry and calculus applied to such would be helpful.
    Last edited: May 23, 2013
  18. May 24, 2013 #17
    The air pressure has a decrease variaton from north to south.
    If I have three points, aligned from north to south with Pressures : p1=1020hPa ; p2=1017hPa ; p3=1013hPa and a point P, who's at south of the point 3, the pressure in P must be smaller then p3 (1013hPa).

    Can your fomula present that result?
  19. May 24, 2013 #18
    Its not a true solution. If I have, for example three points from North to south, with pressures p1=1020 ; p2=1017 and p3=1013. And if i'm in a position that is at south of p3, there, air pressure must be smaller then p3, but with your formula, I have a value near 1014 or 1015.. That's not right, we can't use Air pressure calcution with weights :)
  20. May 24, 2013 #19
  21. May 24, 2013 #20


    User Avatar
    Gold Member

    If that is the case then a simple equation of a line through 3 points would be sufficient, or an approximation of the best fit line, and then extrpolate to your 4th point.

    you should note that with only 3 points as your data set, there could be many equations that can describe the variation of pressure over the surface ( line in the special case of 3 data points in a row ) , which is why I suggested as taking the linear model approach.

    What you are actually asking is what equation descibes the variation of air pressure given 3 points, and that is impossible to say. For example, a sinusoidal variation with frequency/amplitude dependancy could apply, so could some sort of quadratic function, ..., etc, and all are equally valid since the a priori function is unknown. Each equation would necessarily have a different weighting value applied to the points and subsequentaly your 4th point is basically unknown until you can actually describe the relationship. Without the function, assume the most basic and that would be linear.
  22. May 24, 2013 #21
    Theres's not missing the a4 and also the respective d ?

    I tried your formula (without the third pressure and x,y position) and its not working, it gaves me a big value (1824347.62).. I don't know why!



Share this great discussion with others via Reddit, Google+, Twitter, or Facebook