# Calculate distance

i would need some help calculating the distance on the road between two points for witch i have their gps position. I have readings for gps positions every 20 seconds, but if make a sum of the distances between two consecutive gps positions because of different gps errors i don’t get a very accurate distance. Is there a way to reduce significantly these errors? Like i said i need the distance between the points on the road so i don’t have a straight line but i need to be as accurate as possible

There are no easy ways to do this as far as I know.

I can only recommend you try various methods, with varying times between the point checks, look at speed and direction of the position and tune your application until you’re reasonably satisfied.

The higher precision you require, the more expensive it will get, so decide first how large errors you can accept, measured as for example meters per kilometers.

Well i would need a precision of about 1%, meaning if in reality the vehicle made 100 km at most i need to get as a result for my calculations is 99 km or 101 km

Hello,

If you want to measure the traveled kilometers between two points, the 20 seconds sample rate is to high and obviously the roads are not always straight. As tobies wrote you can look at the speed and the direction parameters, however modern GPS-s already include very good algorythms for this. Look for the static navigation and route smoothing sections in you r GPS manual, and configure these options in your receiver.

I fear you have no direct connection with the GPS receiver so your options are limited. Isn’t it?