views:

10

answers:

1

Hi Guys, I've written a kind of navigation system for pedestrians. The only thing is, that I need a criterion to finish the navigation.

My values are gives as lat/long pairs.

What would you assume would be a good value to say, both positions are equal/near enough to tell the user that he has reached the goal?

Please keep also in mind, that it's idfficult to say "directly equal", because GPS modules may have variances...

greetz from europe,

poeschlorn

+1  A: 

if you compare the distance to 0.0001 (Around 10 meters) you should be set.

To do this

distance = sqrt( pow ( lat1 - lat2 , 2 ) + pow ( long1 - long2 , 2 ) )
if ( distance < 0.0001 ) {
   //Grats! you got there
}
arclight
this sounds good, I will try this out :)
poeschlorn
Better still, you could use the PDOP for the GPS observation, which may work better in built up areas where positional accuracy is "less than brilliant"
Rowland Shaw
eeeeermmm....am I right with my assumption, that 0.00005 is 5 meters?I assume, that 5 meters per lat/lon would be enough!?
poeschlorn