Latitude & longitude & air pressure

In summary: Suppose that you are at the station "A" and you want to find the pressure at station "B". The interpolation equation would give you:p_B=a_1+a_2d+a_3d^2However, since you are at station "A", the pressure at station "B" is actually higher than the interpolated value! This is because the pressure at station "B" is weighted more than the pressure at station "A".
  • #1
wachovia
10
0
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
PressureInPosition=(Pressure1 + Pressure2 + Pressure3)/3
, 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?

Thanks

Wachovia
 
Physics news on Phys.org
  • #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]
 
  • #3
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.
 
  • #4
and just hope there isn't something like a weather front between you and some of the stations.
 
  • #5
256bits
, can I use the decimal values of latitude and longitude to x and y ? Or should I convert them to another value?
 
  • #6
MisterX said:
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]

You are giving the greatest weightage to the station which is farthest away. How would that work?!
 
  • #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:
  • #8
physwizard said:
You are giving the greatest weightage to the station which is farthest away. How would that work?!

Absolutly true
 
  • #9
physwizard said:
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.

What is x and y ? decimal latitude and longitude? Or can D be the distances that I'v already calculated?
 
Last edited:
  • #10
wachovia said:
What is x and y ? decimal latitude and longitude? Or can D be the distances that I'v already calculated?

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:
  • #11
physwizard said:
You are giving the greatest weightage to the station which is farthest away. How would that work?!

poorly

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]
 
  • #12
physwizard said:
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.

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.
 

Attachments

  • quadratic_polyfit.png
    quadratic_polyfit.png
    2.1 KB · Views: 438
Last edited:
  • #13
physwizard said:
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.


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
 
  • #14
MisterX said:
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].

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:
  • #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.
 
  • #16
, can I use the decimal values of latitude and longitude to x and y ? Or should I convert them to another value?
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.
http://www.math.washington.edu/~king/coursedir/m445w04/notes/vector/equations.html

Given points P, Q, R in space, find the equation of the plane through the 3 points.

Example: P = (1, 1, 1), Q = (1, 2, 0), R = (-1, 2, 1). We seek the coefficients of an equation ax + by + cz = d, where P, Q and R satisfy the equations, thus:

a + b + c = d
a + 2b + 0c = d
-a + 2b + c = d

Subtracting the first equation from the second and then adding the first equation to the third, we eliminate a to get

b - c = 0
4b + c = 2d

Adding the equations gives 5b = 2d, or b = (2/5)d, then solving for c = b = (2/5)d and then a = d - b - c = (1/5)d.

So the equation (with a nonzero constant left into choose) is d(1/5)x + d(2/5)y + d(2/5)z = d, so one choice of constant gives

x + 2y + 2z = 5

or another choice would be (1/5)x + (2/5)y + (2/5)z = 1

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:
  • Like
Likes 1 person
  • #17
256bits said:
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.
http://www.math.washington.edu/~king/coursedir/m445w04/notes/vector/equations.html



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.

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?
 
  • #18
MisterX said:
poorly

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]

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
wachovia said:
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?

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.
 
  • #21
physwizard said:
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.

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!

a1=1018
a2=1018
a3=1018

x2=40.2
x3=40.9

y2=-8.55
y3=-8.65
 

1. What is the purpose of latitude and longitude?

Latitude and longitude are used to locate specific points on the Earth's surface. Latitude measures the distance north or south of the Equator, while longitude measures the distance east or west of the Prime Meridian. Together, they provide a precise coordinate system for identifying any location on Earth.

2. How is air pressure measured?

Air pressure is typically measured using a barometer, which measures the weight of the atmosphere above a specific location. The most common unit of measurement is millibars, with the standard atmospheric pressure at sea level being 1013.25 millibars.

3. What factors affect air pressure?

Air pressure is affected by a number of factors, including temperature, altitude, and humidity. As temperature increases, air molecules move faster and spread out, resulting in lower air pressure. As altitude increases, air pressure decreases due to the decrease in the weight of the atmosphere above. Humidity also plays a role, as water vapor is less dense than dry air and can lower air pressure.

4. How does air pressure impact weather?

Air pressure is a crucial factor in determining weather patterns. High pressure systems are associated with clear skies and calm weather, while low pressure systems are associated with cloudy skies and more extreme weather conditions. Differences in air pressure between different areas of the Earth also create winds, which can impact weather patterns.

5. How is air pressure used in weather forecasting?

Air pressure is an important component in weather forecasting, as it provides valuable information about the current and future weather conditions. Meteorologists use air pressure readings to track the movement of high and low pressure systems, which can help predict changes in weather patterns and potential severe weather events.

Similar threads

Replies
27
Views
2K
Replies
12
Views
3K
Replies
8
Views
3K
Replies
1
Views
572
  • Earth Sciences
Replies
4
Views
4K
  • Mechanical Engineering
Replies
14
Views
17K
Replies
13
Views
2K
  • Sci-Fi Writing and World Building
Replies
2
Views
2K
Replies
35
Views
7K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
Back
Top