Shipping / air line subject, very sorry.
2007-03-15 20:42:37
·
answer #1
·
answered by Expression 5
·
0⤊
0⤋
This problem can be most easily solved by using spherical coordinates on the
earth. Have you dealt with those before? Here's the transformation from
spherical coordinates to normal rectangular coordinates, where a=latitude
and b=longitude, and r is the radius of the earth:
x = r Cos[a] Cos[b]
y = r Cos[a] Sin[b]
z = r Sin[a]
Then we'll use the following property of the dot product (notated [p,q]):
[p,q] = Length[p] * Length[q] * Cos[angle between p & q]
Now, any vector that points to a point on the surface of the earth will have
length r. So the right side we have r^2 * Cos[angle between p & q]. On the
left side, we can pull the r's out of the dot product, and cancel them with
the r's on the right side. Let t represent the angle between p and q. Then
if the latitude and longitude of our two cities, p and q, are (a1,b1) and
(a2,b2), we have
Cos[a1] Cos[b1] Cos[a2] Cos[b2] + Cos[a1] Sin[b1] Cos[a2] Sin[b2]
+ Sin[a1] Sin[a2] = Cos[t]
So you can compute the angle t as a function of a1, b1, a2, b2, which are
the latitudes and longitudes of our cities p and q. Then visualize what
you've got: draw a great circle through the points p and q. This is just a
plain old Joe-Schmoe circle of radius r, and the angle t is the angle of the
arc that subtends p and q. The problem from here on out is just figuring
out what the arc length between p and q is. The relevant formula is
Arc length = t/360 * 2Pi* r. So that's your formula. By substitution, we
have
Arccos[Cos[a1] Cos[b1] Cos[a2] Cos[b2] + Cos[a1] Sin[b1] Cos[a2] Sin[b2]
+ Sin[a1] Sin[a2]]/360 * 2Pi * r
Oh, by the way, West longitude means negative values of b, and South
latitude means negative values of a.
2007-03-16 07:48:47
·
answer #2
·
answered by Answergirl 5
·
0⤊
0⤋