Calculate distance given Latitude and longitude


By Abeeda Mohammed (M728) on Tuesday, November 28, 2000 - 05:00 pm :

Hi,
I would like to know the formula for calculating distance using latitude and longitude.

Thank you,

Abeeda


By The Editor :

The following replies are quite advanced. If you are interested in latitude and longitude, have a look at this MOTIVATE conference .


By Kerwin Hui (Kwkh2) on Wednesday, November 29, 2000 - 01:08 pm :

Do you know about spherical polar coordinates?


By Kerwin Hui (Kwkh2) on Thursday, November 30, 2000 - 12:05 pm :
OK, I can't find how to draw a diagram of spherical polar coordinates..., anyway, latitude is slightly different from the way it is done in spherical polar coordinates, so we'll need to substitute θ+ latitude =π/2 (Sorry for using radians here... it is natural to use radians)

Anyway, in spherical polar coordinates, we have

ds2 = dr2 + r2 d θ2 + r2 sin2 θd φ2

and the geodesic on the sphere is:

cotφ=ksin(θ-α)

where k and α are constants, determined by the boundary condition. (BTW, this can be derived using calculus of variation)

Substitute and integrate for s will give you the answer.

Kerwin


By Brad Rodgers (P1930) on Friday, December 1, 2000 - 12:47 am :

Alternatively, if you want to find it without using calculus, you can apply the cosine rule to the following triangle:

a=((tan θ1 -tan θ2 )2 +4(tan( φ1 - φ2 )2 )1/2

b=(1+(tan θ1 )2 )1/2

c=(1+(tan θ2 )2 )1/2

(using Kerwin's concept for θ [latitude starts with 0 at the top, right?]) (you can also figure b and c with cosines, but oh well, it's already typed)

To find angle A (opposite side a). This is the angle between the two points. So just divide this by 360 and multiply by 2πr (or just multiply by r if you're using radians). If you're proficient in calculus, you can probably use Kerwin's method more proficiently, but otherwise, this method should work, albeit with just a little bit of work...

Brad