# LoRaWAN Networking in Mobile Scenarios Using a WiFi Mesh of UAV Gateways
## 2 Related Work
According to this algorithm, each UAV is subject to a virtual force  
\[\overrightarrow{F}_{dir}=\overrightarrow{F}_{conn}+\overrightarrow{F}_{AP}+ \overrightarrow{F}_{CA}, \tag{1}\]  
where \(\overrightarrow{F}_{conn}\) is the force that keeps a UAV connected to its neighbors, \(\overrightarrow{F}_{AP}\) is the force that keeps a SN in the range of an AP or a RN, and \(\overrightarrow{F}_{CA}\) is the repelling force that keeps the UAV away from obstacles (i.e., other UAVs). The magnitude and direction of each force are determined by the strength of the communication between each pair of UAVs, measured by the RSSI. \(\overrightarrow{F}_{conn}\) is calculated as follows:  
\[\overrightarrow{F}_{conn}=\sum_{k=1}^{d}\overrightarrow{F}_{conn_{k}}, \tag{2}\]  
\[\overrightarrow{F}_{conn_{k}}=q|\Delta RSSI|\overrightarrow{d}_{0}k. \tag{3}\]  
For each UAV, the \(d\) neighboring UAVs with the best connections are chosen. For each pair, \(\overrightarrow{F}_{conn_{k}}\) is computed. \(\Delta RSSI\) measures how far the current RSSI (\(RSSI_{curr}\)) is from the maximum RSSI (\(RSSI_{max}\)) or minimum RSSI (\(RSSI_{min}\)) threshold, while \(\overrightarrow{d}_{0\,k}\) is the normalized directional vector between the two UAVs, and \(q\) determines if the force is attractive or repulsive. If \(RSSI_{curr}\) is above \(RSSI_{max}\), the force is repulsive, while if it is below \(RSSI_{min}\), the force is attractive. The force is zero only when \(RSSI_{curr}\) is between \(RSSI_{min}\) and \(RSSI_{max}\). The resulting force \(\overrightarrow{F}_{dir}\) gives the direction in which the UAV has to move in the current time step. [PERSON] et al. [4] propose a distributed algorithm based on VSFs to give coverage to a set of isolated GNs. The mobility of UAVs is subject to three rules: connectivity of the aerial mesh must be preserved, QoS of the links must be guaranteed and the covered GNs must be preserved. These requirements are obtained by moving each UAV according to a virtual force \(\overrightarrow{R}\) given by the sum of the spring forces associated with each wireless link established by the UAV. Each force is computed as follows:  
\[\overrightarrow{F}=-k\cdot\delta, \tag{4}\]  
where \(k\) is the stiffness of the spring and \(\delta\) is its displacement, computed as a function of the link budget \(LB(i,j)\) measuring the quality of the wireless link \((i,j)\). For Air-to-Air (AtA) links, \(k\) is a fixed parameter. For Air-to-Ground (AtG) links, \(k\) is dynamic and defined as follows:  
\[k_{AtG}=\frac{n_{i}}{max(n_{j})\forall j\in Neigh_{i}}. \tag{5}\]  
UAVs connecting more GNs oppose more resistance to movements that might reduce the number of covered nodes. At each time step \(\Delta T\), the resulting force \(\overrightarrow{R}\) is computed for each UAV and then, if the force magnitude is above a certain threshold, the UAV moves with constant speed in the new direction. An exploration phase is also triggered each \(T_{scout}\) seconds. All UAVs with no other UAVin their visibility zone become scout nodes with probability \(p_{SCOUT}\) and an attractive spring force is computed between them and the center of the least visited cell. In [11], the authors perform a comparison with a centralized optimization scheme, which concludes that the distributed algorithm can achieve a performance that is similar to the centralized one. [PERSON] et al. [12] propose a virtual force based scheme in a scenario of detection and location of _respa velutina_. As pursuit UAVs move away from the control node to pursue _respa velutina_ individuals, relay UAVs form a communication chain that provide multihop connectivity to pursuit nodes. Within a communication chain, distances between each two neighbors determine if the force between them is attractive, friction or repulsive, in order to keep the chain connected. A development of this scheme is proposed in [13] to provide area coverage in zones where the network infrastructure is damaged or non-existent.