1. Register a location listener for GPS 2. Request GPS location/dataset at 1s (for greatest accuarcy) interval 3. For each location update, retrieve the data element that contains the device speed 4. Use a moving average algorithm to calculate average speed. A reference design to maintain the moving average, variance and standard deviation of a measurement can be found in "Knuth, The Art of Computer Programming, Vol. 2, 3rd edition"
On Apr 18, 11:30 am, putzz12 <renatoespinoza...@gmail.com> wrote: > hello,im doing a project and i need to know how to get the avg of the > velocity when im running. for example if i run in the park or something i > want to know the avg speed. > if someone can help me will be soo good. > thx. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en