I have set up a GPS tracker on a car that logs it's coordinates to a database every X minutes.
I need to know the distance this car is driving.
What is the best way to calculate this? I see google have a Distance Matrix API (https://developers.google.com/maps/documentation/distancematrix/?csw=1) but it looks like that won't handle multiple coordinates, only the start and end.
Edit: I have done some testing, and obviously since it's calculated using a straight line, the result will vary greatly depending on how often the GPS reports the position. Unfortunately, it's both data transfer/battery intensive to have it report every few seconds.
I guess there's no services that will take my coordinates, and figure out what roads the car most likely drove on? And calculate the distance of the road?