# Cellular and Virtualization Technologies for UAVs:
## 3 Testbed Components Description
### Automated UAV Control System  
In order to support UAV experimentation activities in flight, this paper introduces and implements a system to control UAV trajectories automatically. It is essential to have a centralized system capable of simultaneously controlling several UAVs to facilitate flight operations and reducing system complexity. In the proposed solution, all UAVs can be operated from a GCS (RLoS) or from the UAV-controller (BRLoS). This procedure has been completely automated by transferring the trajectories from the UAV-controller (which is the entity in charge of the computation of such trajectories) into the RPi (in this case, located as the UAV payload) to be executed later in the UAVs. The UAV-controller is in charge of transferring the optimal trajectories to all UAVs in the scenario to avoid collisions with possible obstacles and other UAVs coexisting in the same airspace. A UTM development (meeting all the requirements mentioned above) will replace the UAV-controller functionality. Further research in this direction can be found in the literature [44; 45; 46].  
The automation of this service is based on the Ansible platform (Ansible platform: [[https://www.ansible.com/](https://www.ansible.com/)]([https://www.ansible.com/](https://www.ansible.com/)) (accessed on 27 April 2020)). Ansible is a software tool that automates software provisioning, configuration management, and application deployment. Moreover, it does not require third-party applications to establish communication channels between the central node (UAV-controller) and the hosts (UAVs), as it uses the well-known, and extensively used, SSH protocol.  
On the other hand, UAVs commonly have an Application Programming Interface to control them. This procedure is performed from the RPi (UAV payload) which has previously received the trajectories. One of the most popular examples is the MAVlink library [47]. MAVLink is a lightweight protocol to communicate not only with UAVs, but also with on-board UAV components. Another representative example is the Robot Operating System (ROS) [48], which is a set of building robot applications that are also employed to control UAVs. Using the specified protocols instead of proprietary protocols profifers the system huge flexibility and versatility since they have a big developer community, and in consequence, several commercial compatible UAVs become available. In our case, an open-source Python library called pyParrot (pyParrot's documentation: [[https://pyparrot.readthedocs.io/en/latest/](https://pyparrot.readthedocs.io/en/latest/)]([https://pyparrot.readthedocs.io/en/latest/](https://pyparrot.readthedocs.io/en/latest/)) (accessed on 27 April 2020)) (compatible with a great variety of Parrot UAVs) is used to send the instructions from the RPi to the UAV. The instructions are simple commands already implemented in the library (e.g., take-off, landing, turn right, turn left, etc.) for these experiments. However, these instructions may become more complex if the received trajectories from the UAV-controller requires to. The instructions are sent to the UAV through its WiFi interface. These instructions can be transmitted using various alternatives, such as the serial port, the USB port, or another communication channel. However, the available UAV in the testbed (Parrot Bebop 2) can only be commanded using WiFi.