Seol mar théacs é seo: Optimal control theory with aerospace applications