# Development and Testing of a Two-UAV Communication Relay System
## 4 Software Development
### Software Realization of Relay Process
The indoor tests aimed to determine the suitable data transmission rate, while the outdoor tests demonstrated reliable communication performance in two proposed application scenarios in Hong Kong and one BLOS mission simulation in Taiwan. All the outdoor tests showed the system's capability of maintaining good quality real-time communication through relays, and automatically recovering from communication losses. The current work focused only on communication relay through a single relaying node (UAV \"Mom\"). Relays through multiple relaying nodes, although feasible, will be conducted in the near future. The current configuration of the system allows the system to be extended by adding more relaying nodes. A possible configuration is illustrated in Figure 23, in which multiple relaying nodes (\"Mom 1\" to \"Mom N\") are connected in series, forming a bidirectional relay system. The current design of the data frame permits, at most, 13 relaying nodes between \"Son\" and the GCS. When the format of the data frames was designed, four binary bits were assigned to represent the \"ID\" of the UAV. With four bits to use, at most 16 unique IDs could be represented, among which UAV \"Son\", GCS, and a special broadcasting ID occupied three places. Therefore, there were 13 unique IDs left, which could then be taken up by 13 multiple UAV \"Moms\", theoretically. However, the maximum number of relaying nodes in practice may also be subjected to the constraint of the data rate. With more UAVs in the system, more information will be exchanged. If the data rate is kept unchanged, communication between UAVs and GCS might experience longer delays. Figure 12:9 Extending the relay system by adding relaying nodes. **Supplementary Materials:** The following is available online at [[https://www.youtube.com/watch?v=HxNloafNmzw](https://www.youtube.com/watch?v=HxNloafNmzw)]([https://www.youtube.com/watch?v=HxNloafNmzw](https://www.youtube.com/watch?v=HxNloafNmzw)), Video S1: Multiple UAVs Telecommunication Demonstration. [[https://github.com/YifanJiangPolyU/UAV-communication-relay](https://github.com/YifanJiangPolyU/UAV-communication-relay)]([https://github.com/YifanJiangPolyU/UAV-communication-relay](https://github.com/YifanJiangPolyU/UAV-communication-relay)), Source code 1: Mission control software source code. [[https://github.com/HKPolyU-UAV/Mini_GCS](https://github.com/HKPolyU-UAV/Mini_GCS)]([https://github.com/HKPolyU-UAV/Mini_GCS](https://github.com/HKPolyU-UAV/Mini_GCS)), Source code 2: Mini-GSC source code. **Acknowledgments:** This work is sponsored by Innovation and Technology Commission, Hong Kong under Contract No. ITS/334/15 FP. We also appreciate [PERSON] for his help in mechanical parts of this work. **Author Contributions:** [PERSON] and [PERSON] conceived the relay system. [PERSON] built up the hardware platform. [PERSON] developed the protocol and onboard software. [PERSON] developed the G.C.S. software. [PERSON] and [PERSON] performed the tests and wrote the paper. [PERSON] was in charge of the whole project management. **Conflicts of Interest:** The authors declare no conflict of interest. ## Abbreviations

The following abbreviations are used in this manuscript: \begin{tabular}{l l} BLOS & Beyond-Line-of-Sight \\ UAV & Unmanned Aerial Vehicle \\ GCS & Ground Control Station \\ RSSI & Received Signal Strength Indication \\ FHSS & Frequency-Hopping Spread Spectrum \\ TDM & Time Division Multiplex \\ UART & Universal Asynchronous Receiver and Transmitter \\ CRC & Cyclic Redundancy Checking \\ BER & Bit Error Rate \\ GUI & Graphic User Interface \\ \end{tabular} 

## References

* (1) [PERSON] Prospect and recent research & development for civil use autonomous unmanned aircraft as UAV and MAV. _J. Syst. Des. Dyn._**2007**, \(1\), 120-128. * (2) [PERSON] Unmanned air systems: Challenge and opportunity. _J. Aircr._**2012**, _49_, 1652-1665. [CrossRef]
* (3) [PERSON]; [PERSON] Unmanned aerial systems for photogrammetry and remote sensing: A review. _ISPRS J. Photogramm. Remote Sens._**2014**, _92_, 79-97.