You can decouple the horizontal and vertical motion of your rocket. In the vertical direction you have vertical thrust and gravity and horizontally you only have thrust (I ignore air resistance here). As you are interested in the altitude only, we only look at the vertical problem. All kinetic energy in the vertical direction is converted to potential energy so that your rocket reaches a height $h$.
Since the acceleration is constant, you have $v=at=gt$ and we find that the height equals
Since your rocket travels both up and down and since the path is symmetric around the apogee, you can calculate your altitude by
where $\Delta t$ is the time between launch and landing.