## 4 Methodology
### Homotopic Path Planning Approach  
In this section, a homotopic approach is proposed for planning paths with an expected length. Two path homotopy construction patterns are proposed and they are named as path homotopy 1 and path homotopy 2. In this investigation, the aerial recovery of the UAV swarm is considered to be a long-range mission. As a result, the Dubins path, which connects the initial position and recovery position of a UAV, is generated in stage 1 of the path planning layer and it contains both line and arc segments. Thus, we can only re-plan the line segment to generate the curvature-bounded paths with an expected length. Suppose that \(p_{1},p_{2}\in C(\mathbf{a},\mathbf{b})\) are two curvature-bounded paths that connect \(\mathbf{a}\) and \(\mathbf{b}\). The continuous function \(H\) can be defined as a single-layer path homotopy if the following conditions hold:  
1. \(H(u):[0,1]\to E(p_{1},p_{2})\). 2. \(H(0)=p_{1}\) and \(H(0)=p_{2}\). 3. \(E(p_{1},p_{2})\) is the space of all curvature-bounded paths between \(p_{1}\) and \(p_{2}\). Thus, the output of the function \(H(u)\) indicates a curvature-bounded path function within the path homotopy, and it can be given by  
\[p=\mathcal{H}(\mathbf{a},\mathbf{b},u)=H(u) \tag{21}\]  
where \(\mathcal{H}\) is the mapping from the homotopic description to the path \(p\). The role of the homotopic description is to reserve the boundary points and to use only one independent parameter \(u\) to describe the path. Moreover, for the convenience of computation, we can define another mapping as  
\[p=\mathcal{T}(\mathbf{a},\mathbf{q}) \tag{22}\]  
where \(\mathbf{q}=\left[ \begin{array}{cccc}\mathbf{q}_{0}&\mathbf{q}_{1}&\ldots&\mathbf{q}_{M}\\ \end{array} \right]\) indicates the controlling parameters of the path if the path satisfies \(p=p_{1}\cup p_{2}\cup\ldots\cup p_{M}\). We can determine that the curvature vector \(\mathbf{c}=\left[ \begin{array}{cccc}u_{0}&u_{1}&\ldots&u_{M}\\ \end{array} \right]\) and the length vector \(I=\left[ \begin{array}{cccc}l_{0}&l_{1}&\ldots&l_{M}\\ \end{array} \right]\) can be used to express the path, since the path consists of straight line segments and arc segments. Thus, the mapping can be rewritten as  
\[p=\mathcal{T}(\mathbf{a},\mathbf{c},\mathbf{I}). \tag{23}\]  
Figure 4: Example of the mutation operation. Figure 5: Example of the crossover operation. where \(\mathbf{q}_{m}=[\mu_{m},\,l_{m}],m\in\{1,\,2,\,\ldots,\,M\}\). Compared with the homotopic description, the ending boundary point in this description is not reserved; hence, it is obtained by iteration. However, this description is much more intuitive to express the path. Based on these two path descriptions, two path homotopy construction patterns are presented for the path planning. As shown in Figure 6, the axis defined by the line segment of the Dubins path divides the plane into two half planes. For simplicity, path homotopy 1 is in the upper plane and it is the first to be considered. It can be observed that path homotopy 1 consists of a curve and a straight line, and the curve consists of four equal arcs. Based on the geometrical relationship, the boundary conditions of path homotopy 1 can be denoted as  
\[H(0)=\mathcal{T}(\mathbf{a},\mathbf{c}_{0},\mathbf{l}_{0}), \tag{24}\]  
\[H(1)=\mathcal{T}(\mathbf{a},\mathbf{c}_{1},\mathbf{l}_{1}), \tag{25}\]  
\[\mathbf{c}_{0}=\left[ \begin{array}{cccc}\mu_{a}&\mu_{\text{trans}0}&-\mu_{\text{ trans}0}&\mu_{\text{trans}0}&\mu_{\text{p}}\end{array} \right], \tag{26}\]  
\[\mathbf{c}_{1}=\left[ \begin{array}{cccc}\mu_{a}&0&0&0&\mu_{b}\end{array} \right], \tag{27}\]  
\[\mathbf{l}_{0}=\left[ \begin{array}{cccc}l_{a}&\frac{\text{arcsin}(\mu_{\text{ trans}0}/4)}{\mu_{\text{trans}0}}&\frac{2\text{arcsin}(\mu_{\text{trans}0}/4)}{\mu_{ \text{trans}0}}&\frac{\text{arcsin}(\mu_{\text{trans}0}/4)}{\mu_{\text{trans}0 }}&l_{b}\end{array} \right], \tag{28}\]  
\[\mathbf{l}_{1}=\left[ \begin{array}{cccc}l_{a}&l/4&l/2&l/4&l_{b}\end{array}