How to calculate distance between 2 GPS coordinate

Guides, FAQs, How-to, etc

Moderators: Moderators, Regional Mappers

Forum rules
1. Be nice to each other and respect the moderators. Post in normal font size, color and weight. Follow Nettiquette
2. NO out of topic. Discuss matters pertaining MFM community and forum only.
3. NO abuse, profanity and insults
4. NO spamming, cross posting and opening of duplicate topics
5. NO advertisement post or link
6. NO post/link to warez, cracks, serials or illegally obtained copyrighted content
7. Each message posted is owned by and is the opinion of the original poster. Neither mfm nor its owner or moderators are legally responsible for anything posted on the forum
chinwy
Regional Mapper
Posts: 207
Joined: Thu Sep 18, 2008 4:04 pm
Location: Kuantan, Pahang

How to calculate distance between 2 GPS coordinate

Postby chinwy » Tue Oct 13, 2009 5:29 pm

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.

User avatar
moeyhc
Valued Contributor
Posts: 2240
Joined: Wed Sep 17, 2008 10:53 am
Location: Penang - Nuvi 300, 205W, 2575RLM, M1200, M1000B/C, Papago N1

Re: DISTANCE BETWEEN 2 GPS COORDINATES

Postby moeyhc » Tue Oct 13, 2009 8:09 pm

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:
Common Sense Is Not Common.

simseair
Valued Contributor
Posts: 617
Joined: Tue Sep 23, 2008 10:48 am
Location: JB

Re: DISTANCE BETWEEN 2 GPS COORDINATES

Postby simseair » Tue Oct 13, 2009 10:06 pm

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

chinwy
Regional Mapper
Posts: 207
Joined: Thu Sep 18, 2008 4:04 pm
Location: Kuantan, Pahang

Re: DISTANCE BETWEEN 2 GPS COORDINATES

Postby chinwy » Wed Oct 14, 2009 4:04 pm

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:

turbosnail
Valued Contributor
Posts: 66
Joined: Tue Sep 16, 2008 11:15 pm

Re: DISTANCE BETWEEN 2 GPS COORDINATES

Postby turbosnail » Thu Oct 15, 2009 11:47 pm

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.

User avatar
moeyhc
Valued Contributor
Posts: 2240
Joined: Wed Sep 17, 2008 10:53 am
Location: Penang - Nuvi 300, 205W, 2575RLM, M1200, M1000B/C, Papago N1

Re: DISTANCE BETWEEN 2 GPS COORDINATES

Postby moeyhc » Fri Oct 16, 2009 10:16 am

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:
Common Sense Is Not Common.

chinwy
Regional Mapper
Posts: 207
Joined: Thu Sep 18, 2008 4:04 pm
Location: Kuantan, Pahang

Re: DISTANCE BETWEEN 2 GPS COORDINATES

Postby chinwy » Fri Oct 16, 2009 4:42 pm

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:

76gpsguy
Polygon Mapper
Posts: 207
Joined: Tue Sep 16, 2008 10:15 pm
Location: Puchong, SEL (Symbian MXT)

Re: DISTANCE BETWEEN 2 GPS COORDINATES

Postby 76gpsguy » Sat Oct 17, 2009 2:46 pm

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
You do not have the required permissions to view the files attached to this post.
Last edited by 76gpsguy on Sat Oct 17, 2009 3:14 pm, edited 1 time in total.

User avatar
kchow24
Posts: 100
Joined: Fri Sep 19, 2008 10:16 pm
Location: Shah Alam. Garmin nuvi200W(sold), nuvi710, nuvi765 & GPSmap 60CSx, Garmin-Asus G60, Zumo550
Contact:

Re: DISTANCE BETWEEN 2 GPS COORDINATES

Postby kchow24 » Sat Oct 17, 2009 3:02 pm

=P~ WAW, like going back to school days.... :thumbsup: :peace:
Regards,
kchow24


Return to “Library”

Who is online

Users browsing this forum: No registered users and 24 guests