how to calculate the maximum height of a rocket