# Motion Planning in UAV-Aided Data Collection with Dynamic Jamming
## 3 Global Replanning Based on CFC
### Minimum Time Path Initialization Based on CFC  
In practice, the communication capability of SNs is limited by the power and environment. It is usually necessary to calculate the communication link under the constraints of the demodulator threshold, bit error rate, receiver sensitivity, and so on to determine the supported communication range. We propose flight path segmentation based on a CFC. Full-speed flight paths are generated according to the trapezoidal criterion [5]. To find the CFC, we define the effective communication area of the SN \(k\) free of interferers: \(I_{j,k}=\min\left\{\beta_{0}p_{j}d_{k,j}^{-\alpha},\beta_{0}p_{j}d_{\max}^{- \alpha}\right\}\), where is the trajectory within the effective communication area of the SN, and is the maximum distance. To produce a convex CFC from the jammers and SN, the following procedures are performed:  
1. _Find the nearest jammer_: calculate the distance between all the jammers and SN \(k\), choose the nearest jammer \(j^{*}\), and let the jamming value of the other jammers be \(I_{j,k}=\min\left(\beta_{0}p_{j}d_{k,j}^{-\alpha},\beta_{0}p_{j}d_{\max}^{- \alpha}\right)\), which is the investigated worst-case scenario we have in mind because the jamming value of interferer \(j\) would not surpass \(I_{j,k}\) in the SN \(k\) communication region. 2. _Find critical points_: on the line segment between jammer \(j^{*}\) and the central position of SN \(k\), find a point \(P_{j^{*},k}\) along the direction of the center of the SN communication circle that will meet the communication rate larger than \(R_{\min}\). 3. _Find CFC_: pass through \(p_{j^{*},k}\) and ensure that the perpendicular \(l_{k,j^{*}}\) is on a line between jammer \(j^{*}\) and SN \(k\). The intersection of the half-space on the vertical \(l_{k,j^{*}}\) side of SN \(k\) and the communication range of SN \(k\), is the CFC, which is a convex polyhedron. The detailed construction process is described in Algorithm 1. It divides the UAV path into two paths: the communication path and full-speed flight path. The UAV data are collected on the communication path, which is within the effective communication range. ```
1:functionFind_CFC(\(p_{k},\mathbf{p},p_{j}\))
2: Set the jammer set \(jammer\_open\_list=\{1,2,\cdots,J\}\) and \(jammer\_close\_list=\{\emptyset\}\). 3: Search for jammer closest to the sensor node:
4:\(j^{*}=\text{arg }\min\limits_{j\in\mathcal{J}}\ \left\|p_{k}-p_{j}\right\|\)
5: Remove \(j^{*}\) from the set:
6:\(jammer\_open\_list\to j^{*}\)
7:\(jammer\_close\_list\to j^{*}\)
8: Set the energy of the remaining jammer:
9:\(I_{j,k}=\min\{\beta_{0}P_{j}d_{k,j}^{-\alpha},\beta_{0}P_{j}d_{\max}^{-\alpha}\}\)
10: Get the line segment \(\left[p_{k},p_{j^{*}}\right]\) between the nearest jammer, and search for point \(p_{j^{*},k}\) to make it meet: \[p_{j^{*},k}=\text{arg}\max\limits_{p_{m,k}\in\left[p_{k},p_{j^{*}}\right]}\left\| p_{j,k}-p_{k}\right\|\]
11:\(s.t.\quad B\cdot\log_{2}\left(1+\frac{\beta_{0}p_{k}\left\|p_{j}\left\|-w_{k} \right\|^{-\alpha}}{l_{k}+\sigma^{2}}\right)\geq R_{\min}\) \[I_{k}=\sum\limits_{j=0,j\
eq j^{*}}^{M}I_{j,k}+\beta_{0}p_{k}\left\|p_{j,k}-p_{k} \right\|^{-\alpha}\]
12:if there is no \(p_{j^{*},k}\), it is determined that SN \(k\) cannot perform the data collection, stop algorithm. 13:else continue
14: Find the perpendicular of line segment \(\left[p_{k},p_{j^{*}}\right]\) through point \(p_{j^{*},k}\):
15:\(a_{j^{*}}^{T}w=b_{j^{*}}\)
16: Search for jammer \(j^{\prime}\) belonging to \(C_{k,n}(p_{k})\) and perpendicular to line segment \(\left[p_{k},p_{j^{*}}\right]\) through \(w_{m^{\prime}}\):
17:\(a_{j^{*}}^{T}w=b_{j^{*}}\)
18: combine perpendiculars:
19:\(\mathbf{A_{k}}^{\intercal}\leftarrow\left[ \begin{array}{c}a_{1}^{T}\\ a_{1}^{T}\\ \vdots\end{array} \right],\mathbf{b}_{k}\leftarrow\left[ \begin{array}{c}b_{0} \\ b_{1}\\ \vdots\end{array}