STATE: Adding code to detect the drone state.