Optimal finite-thrust spacecraft trajectories using collocation and nonlinear programming