Text this: Detecting anomalies in unmanned aerial vehicles via the optimization method