Control and Diagnosis for an Unmanned Aerial Vehicle