# Development and Testing of a Two-UAV Communication Relay System
## 4 Software Development
### Software Realization of Relay Process
The tall trees would block the communication signal from GCS to UAV \"Son\". Then the UAV \"Mom\" took off and loitered at the UAV \"Mom\" position, which was above the forest. The UAV \"Son\" would recover the communication with home GSC with the help of relay point UAV \"Mom\". The relative positions of all the communication nodes can be more clearly conceived in the schematic shown in Figure 17.

Figure 14: Radio communication relay testing setup. Figure 15: (**a**) Percentage of data loss and (**b**) bit error rate with respect to data rate. RSSI and noise of both UAV \"Son\" and UAV \"Mom\" were recorded and shown in Figure 18. RSSI can reflect the strength of wireless signal received by the UAV \"Mom\" and UAV \"Son\". After several tests, we found that only when RSSI value is 20 scale (about 7 dBm) higher than the average noise value can the wireless modules keep a stable connection. Therefore, a dashed blue line is added to each figure to indicator when the connection is lost or unstable. The test started at time 0 s, when UAV \"Son\" took off and flew to the mission area. The duration of the whole test mission was about 10 min. Since 120 s, the UAV \"Son\" reached the area behind the tall trees so the RSSI decreased significantly until it reached the noise level and the connection with the GCS was lost. At this moment, the UAV \"Mom\" took off and flew to the relay point. Before 120 s, UAV \"Mom\" stayed at home near the GSC so the RSSI remained at a high value. After take off, the RSSI of UAV \"Mom\" decreased but still remained much higher than the noise, which means that the UAV \"Mom\" kept connecting with the GSC. During the 180 to 420 s, the UAV \"Son\" flew over the forest and landed on the road. In the Figure 17a, the RSSI fell to the same scale with noise value. In this period, the UAV \"Son\" remained disconnected with GCS. After the time 420s, the UAV \"Mom\" flew close to UAV \"Son\" and relayed the communication to

Figure 16: Final positions of nodes in the Google map in the cross-obstacle tests test in Hong Kong. Figure 17: Schematic of cross-obstacle communication relay flight test. help UAV \"Son\" reconnect with the GCS. Then the RSSI value of \"Son\" recovered. The UAV \"Mom\" continually filed to UAV \"Son\" (away from the GCS) for a while which caused further increase of RSSI of \"Son\" and decrease of \"Mon\" at the end period. ### Extend Distance Test

In the communication distance extension tests in Hong Kong, the UAV \"Son\" was firstly given a mission to fly away as far as possible until the connection was lost. After recording the lost position, which is about 100 m, the UAV \"Son\" continued to fly away for about 60 m and stayed at the position, waiting for the UAV \"Mom\" to relay the communication. Thereafter, the UAV \"Mom\" took off and flew to the direction of UAV \"Son\" until the connection was rebuild. The final positions of UAV nodes in this test is shown in Figure 12:0 With the help of a relay node, a 160 m total connection was achieved. Figure 12:1 Final positions of nodes in the Google map in the extended distance test in Hong Kong. Figure 12:2 Received Signal Strength Indicator (RSSI), noise and critical curve of both (**a**) UAV “Son” and (**b**) UAV “Mom”. The RSSI, noise and critical curves during the full test are shown in Figure 12:3 As is similar with the cross obstacle test, the communication between UAV \"Son\" and GCS was first lost at about 180 s and finally reconnected at about 300 s when the UAV \"Mom\" takeoff and flew near to UAV \"Son\". The drop of RSSI of UAV \"Mom\" was due to its takeoff and flying away from home position. ### Beyond-Line-of-Sight Tests

To further verify the reliability of the communication relay system, including mini GCS, in a beyond-line-of-sight missions, outdoor flight tests were conducted in Xigang flight site, Tainan City, Taiwan (\(23^{\circ}6^{\prime}21.5^{\prime\prime}\) N, \(120^{\circ}12^{\prime}36.0^{\prime\prime}\) E).