Reputation: 62554
if i have this position: 32.226743,34.747009
and i need to know that i in the range of 10 meter from this position
how to know this ?
(i work on C# Windows-mobile 2005)
thank's in advance
Upvotes: 0
Views: 563
Reputation: 107
most laguage support fancutions to calculate it .. and i used it before in java and c# This code in c#:
GeoCoordinate sCoord = new GeoCoordinate(88, 88);
var eCoord = new GeoCoordinate(90, 90);
return sCoord.GetDistanceTo(eCoord);
Upvotes: 0
Reputation: 67198
Then use the great-circle distance formula. THough in reality, when looking at such short distances with respect to the planet's radius, a simple 2D euclidean distance between two points is going to be close enough.
Upvotes: 1
Reputation: 6109
here is a link that might help
Latitude, Longitude, Bearing, Cardinal Direction, Distance, and C#
Upvotes: 1
Reputation: 273804
I will take the question literally, without trying to guess what you really meant:
Upvotes: 1
Reputation: 1039488
Once you get the current position you could calculate the distance between those two points and test if it is less than 10 meters.
Upvotes: 3