Safety Control Design With Flight Envelope Protection and Reference Command Generation