Page 1 of 1

How to calculate distance between 2 GPS coordinate

Posted: Tue Oct 13, 2009 5:29 pm
by chinwy
Any maths guru can help me with this? Assumig the distance is less than 10 km so the sperical issue should not be a big problem in the calculation.

Tks.

Re: DISTANCE BETWEEN 2 GPS COORDINATES

Posted: Tue Oct 13, 2009 8:09 pm
by moeyhc
The easiest way to know the distance between two coordinates is to create the two way points in Mapsource and than check the route distance. Ensure you select Use Direct Route in preference.... Let technology work for you... :D

To use Maths you have to know the Latitude and find the circumference there.... than the rest is knowing the circumference of Earth (assuming the Earth is a perfectly round ball) for the Longitude and using Pythagoras to calculate the Hypotenuse of the Triangle... let me check my books to confirm... :mrgreen:

Re: DISTANCE BETWEEN 2 GPS COORDINATES

Posted: Tue Oct 13, 2009 10:06 pm
by simseair
Hi,

Not sure if you want to know to derive the formula or you just want the distance.

http://www.movable-type.co.uk/scripts/latlong.html

http://www.fcc.gov/mb/audio/bickel/distance.html

Re: DISTANCE BETWEEN 2 GPS COORDINATES

Posted: Wed Oct 14, 2009 4:04 pm
by chinwy
Tks for the link. I'm trying to get a simplified version for the calculations. Not that I need it to be super accurate (to keep track of SWMBO positon) :evil: . The distance of my transponder I intend to rig would be <10 km most of the time in a straight line. Anyting further and BIG BROTHER will be after my skin, I do know some that can go 40 miles running on 900Mhz but that is strictly clear line of sight. The memory available for programming is small and I have to keep its calculations as simple as possible.

Looks like I'll have to digest the data and hopefully come up with some resonable workaround. :frus:

Unfortunately, mapsource option is not in the equation otherwise. :thumbsup:

Tks. Pls keep me updated if you come across a more simple calculation. :prayer:

Re: DISTANCE BETWEEN 2 GPS COORDINATES

Posted: Thu Oct 15, 2009 11:47 pm
by turbosnail
I am no soldier. But during my scouting days in secondary school, I remember a simple way to calculate distance with a given set of coordinates. It uses Pythagorean theorem to calculate the distance(the a equals to the squareroot of b square plus c square thing).

I found this at one of the websites, http://www.movable-type.co.uk/scripts/latlong.html:

1° ≈ 111 km (110.57 eq’l — 111.70 polar)
1′ ≈ 1.85 km (= 1 nm) 0.001° ≈ 111 m
1″ ≈ 30.9 m 0.00001° ≈ 1 m

I think this is the one you are looking for.

Hope it helps.

Re: DISTANCE BETWEEN 2 GPS COORDINATES

Posted: Fri Oct 16, 2009 10:16 am
by moeyhc
Bro TurboS,

The Lontitude distance at the Equator is definitely longer than near the Poles. So having a fix distance to calculate between two points is not practical...isn't it?... cheers....

Happy Depavali !!!... :mrgreen:

Re: DISTANCE BETWEEN 2 GPS COORDINATES

Posted: Fri Oct 16, 2009 4:42 pm
by chinwy
Tks. Pythagorean theorem was one method I was looking at. It's calculation may be compounded by elevation, like the rest of the formulas. Anyway it is lot lot easier as I do not need to deal with trig calculations and that can zap quite a bit of memory. I know I should be able to get the uBlox receiver module to broadcast altitude too. Its quite a chip considering 160dBm 50 channel ability. Hopefully will work as good indoor too. I should be receiving it mid next week .. hopefully :prayer: . I guess, will have to test out the options given by everyone and see what is the best compromise.

Considering the very close, straight line 10 km distance, plus GPS positioning offset, I may be prepared for a big compromise. :mrgreen:

Re: DISTANCE BETWEEN 2 GPS COORDINATES

Posted: Sat Oct 17, 2009 2:46 pm
by 76gpsguy
Distance.JPG

If your activity coverage area is small (let say 50km x 50km) and you can compromise with the distance accuracy, then the above equation can be further simplified by using fixed average latitude of the activity coverage area instead of local latitude, i.e.

D = [a – (a - c) K1] x SQRT[K2 x Long-D2 + Lat-D2]

where
K1 = sin2(Lat-F)
K2 = cos2(Lat-F)
Lat-F = fixed average latitude of coverage area

Example :
Coverage area = 50km radius from Hamilton of New Zealand
Lat-F = latitude at Hamilton
Distance ~= 10km
Error = +-70m

Re: DISTANCE BETWEEN 2 GPS COORDINATES

Posted: Sat Oct 17, 2009 3:02 pm
by kchow24
=P~ WAW, like going back to school days.... :thumbsup: :peace: