Modeling the trajectory of a rocket