Calculating average speed, time and distance