# Motion Planning in UAV-Aided Data Collection with Dynamic Jamming
## 3 Global Replanning Based on CFC
### Minimum Time Path Initialization Based on CFC
\right]\)
20: Calculate the CFC:
21:\(\Omega_{k,n}=C_{k,n}(p_{k})\cap\left\{\mathbf{A_{k}}^{\intercal}\cdot\mathbf{ p}\leq\mathbf{b}_{k}\right\}\), \(\Omega_{j}\leftarrow\Omega_{k,n}\)
22:end
```  
**Algorithm 1**Given the position of SN \(k\) and the position of jammer, find CFC\({}_{k}\). After acquiring the CFC, the initialization generates discrete points on the path according to the \"trapezoidal principle\" because we expect the UAV to be as slow as possible when approaching the SN during data collection. Thus, it needs enough time to complete the task. We conduct the analysis for the case of only one SN, as shown in Figure 3 (the green area is the CFC). We first connect the starting point \(p_{1}\) to sensor position point \(p_{3}\) and terminal position point \(p_{5}\). The intersection points of the line segment and CFC are denoted as \(p_{2}\) and \(p_{4}\). Furthermore, \(|p_{1}p_{2}|\) allocates the time and determines the position of discrete points according to the trapezoidal preparation. The UAV accelerates from the initial position to the maximum velocity, remains at the maximum velocity for a while and finally gradually slows down to zero velocity to reach the end point. The total flight time of this period is \(t_{1}\). In addition, the acceleration period is \(t_{11}\), the period of uniform movement is \(t_{12}\), and the period of deceleration is \(t_{13}\) such that \(t_{1}=t_{11}+t_{12}+t_{13}\), where \(t_{11}=\frac{v_{\max}}{a_{\max}}=t_{13}\), \(t_{12}=\frac{d_{1}}{v_{\max}}-\frac{v_{\max}}{a_{\max}}\), and \(d_{1}\) is the distance of \(|p_{1}p_{2}|\). Therefore, the number of discrete points on the \(|p_{1}p_{2}|\) segment can be obtained as follows:  
\[N_{11}=round(\frac{v_{\max}}{a_{\max}\cdot\delta})=N_{13}, \tag{55}\]  
\[N_{12}=round(\frac{d_{1}}{v_{\max}\cdot\delta}-\frac{v_{\max}}{a_{\max}\cdot \delta}). \tag{56}\]  
Consequently, the discrete points of segment \(|p_{1}p_{2}|\) can be expressed as follows:  
\[p_{1}(n)= \begin{cases}p_{1}(0)+\frac{1}{2}a_{\max}\cdot(n\cdot\delta)^{2},&n=0,\cdots,N_{11}-1\\ p_{1}(N_{11}-1)+v_{\max}\cdot n\cdot\delta,&n=1,\cdots,N_{12}\\ p_{1}(N_{12})+v_{\max}\cdot n\cdot\delta-\frac{1}{2}a_{\max}\cdot(n\cdot \delta)^{2},n=1,\cdots,N_{13}\end{cases}  \tag{57}\]  
\(|p_{2}p_{3}|\) and \(|p_{3}p_{4}|\) are located in the CFC and can meet the minimum communication rate. We suppose that the time \(\frac{Q_{th}}{r_{th}}\) is necessary to collect data at the minimum rate \(r_{th}\) and the requested minimum quantity \(Q_{th}\). This time period comprises two flight paths with the flight times \(t_{2}\) and \(t_{3}\), respectively:  
\[t_{2}+t_{3}=\frac{Q_{th}}{r_{th}}, \tag{58}\]  
\[N_{2}+N_{3}=\frac{Q_{th}}{r_{th}\cdot\delta}. \tag{59}\]  
We let these two trajectories move at a constant speed. Thus, \(\frac{N_{2}}{N_{3}}=\frac{d_{2}}{d_{3}}\), where \(d_{2}\) and \(d_{3}\) are the distances of \(|p_{2}p_{3}|\) and \(|p_{3}p_{4}|\), respectively. We determine \(N_{2}\) and \(N_{3}\) as follows:  
\[N_{2}=\frac{Q_{th}}{r_{th}\cdot\delta}\cdot\frac{d_{2}}{d_{2}+d_{3}}, \tag{60}\]  
Figure 3: Path initialization based on CFC. \[N_{3}=\frac{Q_{th}}{r_{th}\cdot\delta}\cdot\frac{d_{3}}{d_{2}+d_{3}}, \tag{61}\]  
\[p_{2}(n)=(1-\frac{n}{N_{2}})\cdot p_{2}(0)+\frac{n}{N_{2}}\cdot p_{2}(N_{2}-1),n= 1,\cdots,N_{2}, \tag{62}\]  
\[p_{3}(n)=(1-\frac{n}{N_{3}})\cdot p_{3}(0)+\frac{n}{N_{3}}\cdot p_{3}(N_{3}-1),n =1,\cdots,N_{3}. \tag{63}\]  
where \(p_{2}(0)=p_{2}\) and \(p_{3}(0)=p_{3}\). \(|p_{4}p_{5}|\) and \(|p_{1}p_{2}|\) can be processed in the same way. Therefore, we can obtain the initial waypoints of the global plan according to Algorithm 2.