Best practice to calculate the average speed from GPS coordinates
- by Sebi
i have here a device which can give me gps coordinates. the time intervall i can define. i want to use it to calculate the average speed during driving or travelling by car. actually i used a orthodrome formula to calculate the distance between two points and then divided it by the given time intervall. by the implemenation i followed this term (http://de.wikipedia.org/wiki/Orthodrome#Genauere_Formel_zur_Abstandsberechnung_auf_der_Erde). Unfortunately i could only find a german link, but i think the formula should be understandable in any language ;)
Unfortunately, using this formula and a time intverall of 1 seconds gives very unprecises results. the speed while walking is between 1 km/h and 20km/h.
So i wonder if there is a general reference how to implement distance calculation between two gps coordinates (i found something similar on SO) and particulary, which is the best time intervall to update the GPS coordiantes.