Aircraft trajectory optimization using nonlinear programming