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 q+ latitude =p/2 (Sorry for using radians here... it is natural to use radians)

Anyway, in spherical polar coordinates, we have

ds2=dr2+r2 dq2+r2sin2qdj2

and the geodesic on the sphere is:

cotj = ksin(q-a)

where k and a 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=((tanq1-tanq2)2+4(tan(j1-j2)2)1/2

b=(1+(tanq1)2)1/2

c=(1+(tanq2)2)1/2

(using Kerwin's concept for q [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 2pr (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