title: calculate actual distance travelled by mobile
body: <p>I want to calculate actual distance traveled by mobile (iOS and Android). I know through google map API, we can find optimum route distance between 2 coordinates. But I want to calculate distance, actual path mobile(in vehicle) has covered.</p>
  
  <p>One Algo I came to know is saving coordinates after x seconds, lets say after 5 or 10 seconds, and then calculate distance between consecutive coordinates, and there sum will give total distance.</p>
  
  <p>I want to discuss better approach of its solution , Is there any better solution?</p>
  
  <p>Edit : How Apps like Nike running app and Uber works?</p>