Calculating cab port length