Pātuhitia tēnei: Optimal control theory with aerospace applications