Pseudospectral optimal control for trajectory optimization in Aerospace Systems