# Communication Interface Manager for Improving Performance of Heterogeneous UAV Networks
## 5 Experimental Setup  
To validate the proposed IM, a complex and realistic simulation environment suitable for analyzing multi-UAV communication characteristics was assembled. It was composed of three different simulation tools:  
* NS-3: This classic network simulator is used to compose virtual communication nodes assigning interfaces (PHY), standards (MAC), routing protocols, general settings (channel, frequency, and propagation models), loss and fading models, IP address, and other networks settings needed to deploy wireless simulation environments [15; 40]. Version 3.30.1 was used. * GzUAV: The Gazebo-based framework for ArduCopter multi-UAV simulation allows running multiple-UAV simulations in Gazebo [41]. The set of programs includes a tool called GzUAVChannel, which creates instances of virtual UAVs in Gazebo, keeping the simulation clock strictly synchronized with NS-3 and ArduCopter (allows simulated UAVs to be ready to fly), compounding more realistic wireless network simulations. ROS topics are applied by the framework that integrates the Mavlink protocol commands and simulation clocks in order to compose virtual communication  
Figure 2: Decision tree used by the interface manager. channels for more than one instance of ArduCopter. Thus, each channel is defined by a UAV with different SSIDs, ports, and addresses, generating multiple instances to be connected in Gazebo. This framework also allows writing programs using the DroneKit platform. * Gazebo (robot simulation): This tool is used to generate 3D simulations, allowing the creation of realistic scenarios where robots, or populations of robots, perform their missions (robots are UAV in the present study). This allows the testing of algorithm performance and the validation of models. Gazebo allows the definition of real coordinates for UAVs trajectories (waypoints) and realistic experimentation scenarios. Other useful features include: speed definition, UAV flight mode, UAV model, and distance-altitude calculation. The experiments presented in this paper use the features of the Iris UAV RTF Quadcopter. Using NS-3 and Gazebo with GzUAV integration allowed us to create vehicles with high-mobility features and vast wireless communication possibilities. Figure 3 illustrates the interaction among the adopted tools, as further detailed below. We considered 17 interaction steps in communication flow, as follows: 1. Setup: This block comprises all the definitions of the nodes and the general network configurations, such as number of nodes, available routing protocols, MAC and PHY configurations, the types of messages (traffic), the transport protocol used, IP addresses, network topology, packet transmission rates, and evaluation metrics. This setup block applies one or more interfaces in nodes and provides all parameters or conditions used in the interface manager (IM) decisions block; 2. The NS-3 inserts in a node the interfaces defined in the set of interfaces \(INT\), using the Setup block features; 3. GzUAV integrates this node in an UAV, which has the trajectory, speed, virtual address, and waypoints; 4. Gazebo inserts the UAV node in a simulation environment, executing its mobility model; 5. Gazebo sends the UAV coordinates and current time to GzUAV, which synchronizes with the NS-3 simulation time and calculates the node position; 6. The IM starts the sensing and spreading of beacon data frames using MAC and PHY interfaces; 7. GzUAV applies this behavior while the UAV is moving; 8. Gazebo sends the current UAV position and execution time; 9. GzUAV receives these data and attaches them to the node to correlate the sensed and calculate conditions with the current position of a node and the simulation time; 10. The IM receives the data and defines an interface for the next round of message transmission (messages produced by the composing message block); 11. The composing message block defines the access classes of messages, data rate, packets sizes, payload, and sender-receiver nodes; 12.