Optimal Mission Planning for an Autonomous Unmanned Aerial Vehicle