What factors affect the maximum height that a rocket can reach when launched vertically?