Best practice to calculate the average speed from GPS coordinates

Posted by Sebi on Stack Overflow See other posts from Stack Overflow or by Sebi
Published on 2010-05-09T00:27:41Z Indexed on 2010/05/09 0:28 UTC
Read the original article Hit count: 786

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about gps

Related posts about math