Calculation of stopping distance