Good afternoon!
Can you tell me how to calculate the maximum speed of the user? Do you have an example of the implementation of the function?
And also tell me to calculate the distance traveled? Maybe someone has an example of implementation.
My application is a speedometer, used only Core Location.
Thank you!
When you init a CLLocation, you can ask to get speed info at each measure. Then, store this value in an array. And evaluate the max value in the array to get max speed, when you need.
What distance do you want to measure: the travelled or the distance from origin ? For travelled distance, each time you get a CLLocation value, compute the distance from previous point (if update is frequent enough, evaluate this as sort(dx*dx + dy+dy) where (dx, dy) is the delta between the two CLLocation. Then increment a totalDistance Float value to compute the travelled distance so far.
May read this for implementation details.
https://stackoverflow.com/questions/38512443/provide-simple-method-to-get-current-speed-implementing-speedometer