Gear ratio and distance calculation