# can we detect a speed of moving using locationmanager class

sam liya

Ranch Hand

Posts: 1243

posted 5 years ago

If you can determine the location at time X and the location at time Y, and if you can store that information, and if you can compute the distance between two locations, then yes, you can compute your speed over that interval. The definition of speed is

Speed = Distance / Time

You'll want to avoid choosing a short interval for "Time" because that will magnify the errors in "Distance" which come from inaccurate estimates of the location.

Speed = Distance / Time

You'll want to avoid choosing a short interval for "Time" because that will magnify the errors in "Distance" which come from inaccurate estimates of the location.