# Development and Testing of a Two-UAV Communication Relay System
## 4 Software Development
### Software Realization of Relay Process
In this test, the transmission power of the telemetry modules were turned to the maximum value to get the longest communication range. The Google map of the test site and final positions of the UAVs in the test are shown in Figure 12:4

The random of the typical flight mission is given below:

1. All UAVs (\"Mom\" and \"Son\" in this case) are powered up. 2. Start GCS software \"Mini GCS\". Figure 12:5 Final positions of nodes in the Google map in the extended distance test in Taiwan. Figure 12:6 RSSI, noise, and critical curve of both (**a**) UAV “Son” and (**b**) UAV “Mom”. Wait for communication relay network to start. The startup process is automatic and normally takes less than three minutes. * Using \"Mini GCS\", command \"Son\" to take off and start the execution of a preprogrammed mission, which brings \"Son\" to a destination far enough for the radio communication between \"Son\" and \"Mini GCS\" to break. * Wait until the communication between \"Son\" and \"Mini GCS\" breaks due to distance. * Using \"Mini GCS\", command \"Mom\" to take off and move into the proximity of the destination area of \"Son\". \"[PERSON]\" automatically performs a communication relay when it moves toward \"Son\" and reconnects. The random of the test is shown as a series of pictures in Figure 12:7 A video clip demonstrating the complete test procedure is given in the Supplementary Material. In the video demonstration, UAV \"Son\" started a pre-defined mission. The mission is to fly away for about 600 m until the UAV was BLOS in Figure 22c. When the connection between \"Son\" and GCS was lost (indicated by the green \"Connected\" icon changing to the red \"Disconnected\"), \"[PERSON]\" was deployed to a designated relaying position (about 400 m away from home position). Once \"[PERSON]\" reached the relaying position, communication between \"Son\" and GCS was re-established automatically and was not lost again before the end of the mission. Figure 12:8 A rundown of flight test (**a**) Pre-takeoff setup of flight test; (**b**) UAV “[PERSON]” starts the mission; (**c**) “[PERSON]” is out of radio range and communication with it is lost; (**d**) UAV “[PERSON]” is deployed to the relay position; (**e**) Communication with “[PERSON]” is re-established after being relayed through “Mom”; (**f**) “Mom” and “[PERSON]” return to launch position; the mission is completed. Eight flight tests were conducted. In all of the tests, the system was able to re-establish communication between \"Son\" and \"Mini GCS\" through the relay of \"Mom\". When \"Mom\" reached the designated relaying position, the communication connection between \"Son\" and \"Mini GCS\" was adequately stable for mission operations. The successful rate of the communication re-establishment is 100%. The tests demonstrated that: (1) the system is capable of maintaining uninterrupted communication between GCS and an end node once the relaying node is properly deployed; and (2) connectivity between GCS and the end node can be automatically re-established when the relaying node reaches the proper relaying position, even if it has been previously lost due to an inadequate relay. ## 6 Conclusions and Future Development

In this study, major attention was given to implementing a functional and reliable proof-of-concept UAV communication relay system that uses commercially available hardware components combined with customized software. In the prototype system, two quadrotors, each mounted with a Pixhawk flight controller and a Raspberry Pi 2 Model B microcomputer were used as the aerial platforms. The onboard relay control protocol and program were developed to realize UAV communication extension and cross-obstacle communication. The GSC software was also developed to facilitate the two-UAV relay operations. A series of indoor and outdoor tests were carried out.