## 3 Four-Dimensional Dynamic Cooperative Path Planning Algorithm
### Dynamic Priority RRT* Algorithm
Gratitude is extended to the Shaanxi Province Key Laboratory of Flight Control and Simulation Technology. The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. ## Appendix A

When dealing with the cooperative path planning problem of multiple UAVs in a dynamic threat environment, this paper adopts a hierarchical architecture path planning algorithm; that is, the proposed DPRRT* algorithm is used as the coordination of the cooperative path planning sequence, and the cooperative path planning itself and the improved HAPF is used as the local collision avoidance planner of the UAVs. Therefore, in this section, we introduce the classical RRT* algorithm and the classical APF algorithm. 1. RRT* Algorithm

The sample-based RRT* algorithm, which is shown in Algorithm A1, was proposed by [PERSON] and [PERSON] [44]. The algorithm introduces the neighborhood node optimization mechanism, which enables the algorithm to find an asymptotic optimal solution on the basis of probability completeness. RRT* and its variant algorithms have been widely studied in the field of path planning for single UAVs. However, for the cooperative path planning of multiple UAVs, only relying on RRT* does not result in a good performance, and there is less related research on this topic. It should be noted that the multi-UAV cooperative path planning algorithm based on the decoupling method can be perfectly combined with RRT* to deal with the cooperative path planning problem. In addition, RRT*, based on the cost function guided tree node expansion and optimization, is able to meet specific planning requirements through improvement. 2. Artificial Potential Field Algorithm

The basic idea of the APF is to establish attractive and repulsive potential fields for goals and obstacles, respectively. Then, a collision-free path is generated from the starting node to the goal by combining the effects of attraction and repulsion on the UAVs. The APF only considers the resultant field on the initial path node of the UAV and then calculates the next path node. Therefore, it requires high computing efficiency. The attractive potential field function \(U_{att}\) and the repulsive potential field function \(U_{rep}\) can be expressed as follows:

Figure 6:5

\[U_{rep}(x)= \begin{cases}\frac{1}{2}k_{rep}(\frac{1}{\rho(x,x_{o})}-\frac{1}{ \rho_{o}})^{2}&\rho(x,x_{o})\leq\rho_{o}\\ 0&\rho(x,x_{o})>\rho_{o}\end{cases}  \tag{2}\]

where \(x=(x,y,z)\) is the coordinate vector of the current position of the UAV, \(g=(x,y,z)\) is the coordinate vector of the goal, and \(x_{o}=(x,y,z)\) is the obstacle coordinate vector. \(k_{att}\) and \(k_{rep}\) are the coefficients of the attractive potential field and the repulsive potential field, respectively, and \(\rho_{o}\) is the maximum influence distance of threats, and \(\rho(x,x_{o})=\left|\left|x-x_{o}\right|\right|_{2}\). Attraction \(\mathbf{F}_{att}\) and repulsion \(\mathbf{F}_{rep}\) are the negative gradients of their corresponding potential fields:

\[\mathbf{F}_{att}(\mathbf{X})=-\
abla(U_{att})=-k_{att}\rho(x,g)\frac{\partial \rho(x,g)}{\partial x} \tag{3}\]

\[\mathbf{F}_{rep}(x)=-\
abla(U_{rep})= \begin{cases}k_{rep}(\frac{1}{\rho(x,x_{ o})}-\frac{1}{\rho_{o}})\frac{1}{\rho^{2}(x,x_{o})}\frac{\partial\rho(x,x_{o})}{ \partial x}&\rho(x,x_{o})\leq\rho_{o}\\ 0&\rho(x,x_{o})>\rho_{o}\end{cases}  \tag{4}\]

The combined force \(\mathbf{F}_{tot}\) of the attraction of the UAV and the repulsive force generated by \(n\) obstacles is:

\[\mathbf{F}_{tot}(x)=\mathbf{F}_{att}(x)+\sum_{i=1}^{n}\mathbf{F}_{repi}(x) \tag{5}\]

Under the guidance of the combined force, the UAV is able to avoid threats and reach its goal. However, the classical APF also has some shortcomings, such as unreachable targets, the risk of falling into a local minimum, path oscillation, etc.