-1

after getting my distance (using GPS, lat and long), is there any method that I can also get my current speed (using distance and time) , accelerometer are not advised. Thank you :)

  • possible duplicate of [Calculate Speed using GPS in Android](http://stackoverflow.com/questions/6200461/calculate-speed-using-gps-in-android) – i_am_jorf Sep 30 '11 at 04:29

1 Answers1

1

Given a start position and an end position and time dt which is the time it took to move between the two positions:

 float[] distance = new float[2];
 Location.distanceBetween(startLatitude, startLongitude,
     endLatitude, endLongitude, vectorDistance);
 float speed = distance[0]/dt;
skyuzo
  • 1,140
  • 7
  • 13