# Motion Planning in UAV-Aided Data Collection with Dynamic Jamming
## 3 Global Replanning Based on CFC
### Global Path Planning Based on SCA
Thus, we continue to relax the indicator function:  
\[0\leqslant\kappa_{k}[n]\leqslant 1, \tag{39}\]  
\[\kappa_{k}[n]\cdot(\kappa_{k}[n]-1)\geqslant 0. \tag{40}\]  
The convex constraints can be obtained via a Taylor expansion and \(\kappa_{k}[n]\cdot\varepsilon_{k}[n]=\frac{(\kappa_{k}[n]+\varepsilon_{k}[n] )^{2}-(\kappa_{k}[n]-\varepsilon_{k}[n])^{2}}{4}\) for constraints (29), (38) and (40)  
\[ \begin{split}& H_{k}^{r}[n]^{2}-2H_{k}^{r}[n](\kappa_{k}[n]+ \varepsilon_{k}[n])\\ &+(\kappa_{k}[n]-\varepsilon_{k}[n])^{2}\geqslant 4\kappa_{k}[n] \cdot r_{th},\end{split}  \tag{41}\]  
\[ \begin{split}&\sum_{n=1}^{N}\left[H_{k}^{r}[n]^{2}-2H_{k}^{r}[n] \cdot(\kappa_{k}[n]+\varepsilon_{k}[n])\right.\\ &\left.+(\kappa_{k}[n]-\varepsilon_{k}[n])^{2}\right]\cdot\delta \geqslant 4Q_{th},\end{split}  \tag{42}\]  
\[2\kappa_{k}^{r}[n]\cdot\kappa_{k}[n]-\kappa_{k}[n]-\kappa_{k}^{r}[n]^{2} \geqslant 0. \tag{43}\]where \(H_{k}^{r}[n]=(\kappa_{k}^{r}[n]+\varepsilon_{k}^{r}[n])\). Thus, we obtain the new convex constraints (41), (42) and (43) of problem P1 after the equivalent transformation and relaxation of constraints (26i) and (26i). In the next step, we continue to deal with the non-convex constraint (26k) of problem P1. The obstacles in the environment are modeled as cylinders. The UAV must keep a certain safe distance to them during its flight. We set the safe distance as \(d_{safe}\). During the task, the UAV should ensure that the distance between the projection coordinates and the center coordinates of the bottom surface of the cylindrical obstacle exceeds the safe distance or that its flight height is much higher than that of the cylinder to ensure a safe flight. The respective safety constraint between the UAV and obstacle \(m\) is as follows:  
\[ \begin{split}&\left\|p_{xy}[n]-p_{m}\right\|\geqslant d_{safe} \\ &\text{or}\quad p_{z}[n]\geqslant h_{m}+d_{safe}.\end{split}  \tag{44}\]  
This is an \"or\" constraint that is non-convex. In addition, \(p_{xy}[n]\) represents the two-dimensional coordinates projected by the UAV onto the ground, and \(p_{z}[n]\) is the flight height of the UAV. By introducing the variables 0 and 1, we can express the equivalent form of the constraint (44) as follows:  
\[\left\|p_{xy}[n]-p_{m}\right\|+\lambda_{xy,m}[n]\cdot C\geqslant d_{safe}, \tag{45}\]  
\[p_{z}[n]+\lambda_{z,m}[n]\cdot C\geqslant h_{m}+d_{safe}, \tag{46}\]  
\[\lambda_{xy,m}[n]+\lambda_{z,m}[n]\geqslant 1, \tag{47}\]  
\[\lambda_{xy,m}[n],\lambda_{z,m}[n]\in\{0,1\}. \tag{48}\]  
where \(C\) is a big positive constant and \(\lambda_{xy,m}[n],\lambda_{z,m}[n]\) are is a binary number. We further relax these binary integer constraints  
\[ \begin{split}&\frac{(p_{xy}^{r}[n]-p_{m})^{T}\cdot(p_{xy}[n]-p_{ xy}^{r}[n])}{A_{m}^{r}[n]}\geqslant\\ & d_{safe}-\lambda_{xy,m}[n]\cdot C-A_{m}^{r}[n].\end{split}  \tag{49}\]  
where \(A_{m}^{r}[n]=\left\|p_{xy}^{r}[n]-p_{m}\right\|\). By relaxing \(\lambda_{xy,m}\) and \(\lambda_{z,m}\) in constraint (48), the new constraints can be obtained as follows:  
\[0\leqslant\lambda_{i,m}[n]\leqslant 1,i\in\{xy,z\}, \tag{50}\]  
\[\lambda_{i,m}[n](\lambda_{i,m}[n]-1)\geqslant 0,i\in\{xy,z\}, \tag{51}\]  
The relaxation form of the non-convex constraint (51) can be obtained via a Taylor expansion  
\[-\lambda_{i,m}^{r}[n]^{2}+2\lambda_{i,m}^{r}[n]\lambda_{i,m}[n]-\lambda_{i,m} [n]\geqslant 0. \tag{52}\]  
where \(\lambda_{i,m}^{r}[n]\) is the \(r\)-th iteration of \(\lambda_{i,m}[n]\). So far, we have dealt with all the non-convex constraints in P0 to obtain the new optimization problem as follows:  
\[ \begin{split}\text{P1}:&\min_{J,\kappa,\lambda,\varepsilon, I,S}\quad\text{J}^{T}\Big{(}\omega_{1}\textbf{T}_{v}^{T}\textbf{T}_{v}+\omega_{2} \textbf{T}_{a}^{T}\textbf{T}_{a}+\omega_{3}\textbf{I}\Big{)}\,\textbf{J}+\\ & 2\cdot\Big{(}\omega_{1}\textbf{B}_{v}^{T}\textbf{T}_{v}+\omega_{2} \textbf{B}_{a}^{T}\textbf{B}_{a}\Big{)}\textbf{J}\end{split}