Distance and Rotation Calculations