A nonlinear optimal control approach for the autonomous octorotor