Calculation of Time of Flight