A Preflight Planner for Succesful Missions of Unmanned Aerial Vehicles