Originally posted by: Calin
Convert the longitude and latitude in deg min sec. Every minute of arc of longitude is 1 nautical mile. Every minute of arc of latitude around the Equator is 1 nautical mile. This way you find the distance on the North-South direction
Now, at a certain latitude, the length of the circle parallel to the Equator is decreased (it is equal to the Equator multiplied by cosine of latitude). This way you find the distance on the East-West direction
You end up with an triangle with a 90* corner, so the distance is simply the square root of the sum of squares of distances on N-S and E-W axis
Except a^2 + b^2 = c^2 only works for planar trig
Take this case. point A (0, 0), point B (45, 90) where the coordinates are given as (latitude, longitude)
By your method,
In your method, a, b, c are lengths
a, b are found by the formula for the length of a circular arc
a = Re(Blon - Alon) = 6378.14*(90 - 0)*PI/180 = 10018.76 Km
b = Re(Blat - Alat) = 6378.14*(45 - 0)*PI/180 = 5009.38 Km
c = sqrt(a^2 + b^2) = 11201.31 Km
By the spherical trig method.
a, b, c are angles
a = Blon - Alon = 90
b = Blat - Alat = 45
cos(c) = cos(a)*cos(b)
c = acos(cos(a)*cos(b)) = acos(0*0.71) = acos(0) = 90
Use the circular arc formula to find the length of this arc
C = Re*c = 6378.14*90*PI/180 = 10018.76
So, the planar trig assumption produces an error of (11201.31 - 10018.76)/10018.76 = 11.8% for this case
For small distances, it may be adequate, but in general, its not.
FWIW, the answer using the polar radius is 9985.24 Km - a difference of 33.5 Km or 0.33% The true answer on the oblate earth will be somewhere between those numbers.