Calculation of travel time and speed