Calculation of work done and distance traveled due to braking