SMS dit: Optimal control theory with aerospace applications