## 2 Materials and Methods
### Geometrical Model  
We take the UAV in the leading position of the formation as the origin \(p_{0}=[0,0,0]^{T}\) of geometric coordinate system \(\mathcal{O}_{G}\in L_{G}\):  
\[L_{G}=\{[x,y,z]^{T}|-\epsilon\leq\delta x,\delta y,\delta z\leq+\epsilon,|x+ \delta x|\leq X_{L},|y+\delta y|\leq Y_{L},|z+\delta z|\leq Z_{L}\} \tag{1}\]  
is the area covered by the internal link communication; \(X_{L}\), \(Y_{L}\), and \(Z_{L}\) are the boundary values of the x-axis, y-axis, and z-axis, respectively; \(\delta x,\delta y,\delta z\) are position offset; and \(\epsilon\) is the speed of the UAV. \(k\) is denoted as a vector \(\mathbf{v_{k,t}}=[v_{x,k,t},v_{y,k,t},v_{z,k,t}]\). The general mobility model of the UAV can be expressed as  
\[\mathbf{v_{k,t}}=\omega_{k}\mathbf{v_{k,t-1}}+\mathbf{\delta_{k,t}}, \tag{2}\]  
where \(\omega_{k}\) is the inertia coefficient and \(\mathbf{\delta_{k,t}}=[\delta_{x,k,t},\delta_{y,k,t},\delta_{z,k,t}]\) is the variation in speed. What is more, the displacement model can be represented as  
\[\mathbf{p_{k,t}}=\mathbf{p_{k,t-1}}+\mathbf{v_{k,t}}\Delta t+\kappa_{k,t}, \tag{3}\]  
where \(\mathbf{p_{k,t}}\) represents the position of access point (AP) \(k\) in time slot \(\Delta t\), \(\Delta t\) is the time stamp of one slot, and \(\kappa_{k,t}\) represents white noise which can be regarded as random offsets due to the environment and other factors. We use wind and rain in the environment as the basis for calculating \(\kappa_{k,t}\). We consider wind and rain as influencing factors in the actual environment. The formula for calculating the equivalent force of wind at different \(h\) is [19]:  
\[f_{w}=\frac{1}{2}C\rho SV_{w}(h)^{2}, \tag{4a}\] \[V_{w}(h)=V_{r}\left(\frac{h}{h_{r}}\right)^{A}, \tag{4b}\]  
where \(F_{w}\) is the size of the wind, \(C\) is the drag coefficient (which is set to 0.2), \(S\) is windward area, \(V_{w}(h)\) is the average wind speed at \(h\), \(V_{r}\) is the average wind speed at \(h_{r}\), \(h\) is geometrical height, \(h_{r}\) is the known altitude, and \(A\) is the ground roughness factor affected  
Figure 1: Overview map of UAV swarm communication.  
by factors such as terrain, stratification stability, etc., and the value is set to 0.4. Finally, we use  
\[\mathbf{F_{w}}=[f_{w}\cos\alpha_{xx}\sin\alpha_{uzz},f_{w}\sin\alpha_{wx}\sin \alpha_{uzz},f_{w}\cos\alpha_{wz}], \tag{5}\]  
to represent wind forces in three-dimensional space where \(\alpha_{wx}\) is the angle between direction of the force of wind and the x-axis and \(\alpha_{wz}\) is the angle between direction of the force of wind and the z-axis. Then, we perform a force analysis of the rain. Based on [PERSON]'s second law, the momentum law, and the best raindrop distribution function, the impact force on the structure per unit area is as follows [20]:  
\[f_{rain}=44.18\times 10^{-9}\rho_{rain}\pi R_{rain}\
u_{rain}^{2}, \tag{6a}\] \[v_{rain}=\Bigg{\{}1-\exp\Bigg{[}\left(\frac{10^{3}d_{rain}}{1.77} \right)^{1.147}\Bigg{]}\Bigg{\}}, \tag{6b}\]  
where \(\rho_{rain}\) is the density of rainwater, \(v_{rain}\) is the final force of a raindrop, \(d_{rain}\) is the diameter of raindrops, and \(R_{rain}\) is the intensity of rainfall. We use  
\[\mathbf{F_{rain}}=[f_{rain}\cos\alpha_{rx}\sin\alpha_{rz},f_{rain}\sin\alpha_ {rx}\sin\alpha_{rz},f_{rain}\cos\alpha_{rz}], \tag{7}\]  
to represent rain forces in three-dimensional space where \(\alpha_{rx}\) is the angle between direction of the force of rain and the x-axis and \(\alpha_{rz}\) is the angle between direction of the force of rain and the z-axis. So within the time slot \(\Delta t\), taking into account wind and rain, the offset is calculated as follows:  
\[\kappa_{k,t}=\frac{1}{m}(\mathbf{F_{rain}}+\mathbf{F_{w}})\Delta t, \tag{8}\]  
where \(m\) is the weight of the UAV.