## 3 Four-Dimensional Dynamic Cooperative Path Planning Algorithm
### Dynamic Priority RRT* Algorithm
The prioritization evaluation function \(f_{HDP}^{\text{UAV}_{i}}\) of UAV\({}_{i}\) is calculated as follows:

\[f_{HDP}^{\text{UAV}_{i}}=\left|t_{co}-\frac{\sigma_{i}(t_{0},t_{co})}{v_{i}}\right| \tag{9}\]

where \(\sigma_{i}(t_{0},t_{co})\) represents the original planned path of the UAV not flying, \(t_{co}\) represents the shortest cooperation time, and \(v_{i}\) represents the speed of UAV\({}_{i}\). It is not difficult to see that the prioritization evaluation function \(f_{HDP}^{\text{UAV}_{i}}\) of UAV\({}_{i}\) is positively related to the amount of time cooperation violations. Therefore, the priority ranking definition of UAVs based on prioritization evaluation functions can be given. **Definition 5** (prioritization strategy based on prioritization evaluation function): _A group of UAVs \(\text{UAV}_{N}:(\text{UAV}_{1},\ldots,\text{UAV}_{n})\) is given. The priority evaluation function set \(\left\{\underset{i=1}{\overset{N}{\underset{i=1}{\overset{N}{\underset{i=1}{ \overset{N}{\underset{HDP}{\right}}}}}}}f_{HDP}^{\text{UAV}_{i}}\right\}\) of UAV\({}_{N}\) is mapped from large to small in order to generate the set \(\underset{\underset{\text{max}\rightarrow\text{min}}}{\overset{N}{\underset{ \text{min}\rightarrow\text{min}}}}\), which in turn corresponds to the \(\left\{1,\ldots,N\right\}\) priority of UAV\({}_{N}\)._

Considering that there may be a situation where some UAVs are not affected by sudden threats, they will continue to fly along their originally planned path. The prioritization evaluation function of these UAVs may be the same. For such UAVs, their priority order remains unchanged. The steps of the dynamic heuristic prioritization strategy are shown as the HeuDyn_Protriization function of Algorithm 2. #### 3.2.2 4 DRT* Algorithm

As a decoupled cooperative path planning algorithm, the DPRRT* algorithm needs to carry out path planning for each UAV to meet the 4D cooperative constraints in order of priority after ranking the priorities of all UAVs in question. Because there is a space-time occupation area composed of high-priority UAV paths and the conflict-free space and time coordination constraints of paths need to be met simultaneously during planning, the classical RRT* cannot meet these planning requirements. Therefore, this paper proposes that the 4 DRRRT* in the single UAV cooperative path planning process of DPRRT* be used in order to ensure that all UAVs are able to plan pathsthat meet the 4D cooperative constraints. Firstly, a cost function based on the 4D cooperation constraints is proposed to evaluate the expansion of the tree. In addition, we introduce the time variable into the RRT* algorithm in order to detect whether there is a spatial conflict between the growth tree and the space-time occupied area. On this basis, a tree node expansion method based on the 4D cost function is designed to guide tree growth. Similar to the tree node expansion method, we also used the 4D cost function to guide the updating and rewiring of nodes in the neighborhood. The 4 DRRT* algorithm can ensure that the planned cooperative path meets the performance constraints, environmental constraints, and 4D cooperative constraints of UAVs at the same time to provide a 4D cooperative path based on the current planning space for multiple UAVs. Next, we introduce 4 DRRT* in terms of two aspects: the 4D cost function and the algorithm process. 1. The 4D Cost Function Design Based on the 4D Cooperation Constraint

Through the process of _ETA_Len_, we can obtain the shortest cooperation time \(t_{co}\) based on the current planning space and then calculate the 4D cooperation path length \(l_{co}^{i}\) of any UAV, UAV\({}_{i}\). If the path length planned by UAV\({}_{i}\) is essentially the same as that planned by \(l_{co}^{i}\) and does not collide with threats and other UAVs, then it can be said that the planned path of UAV\({}_{i}\) meets the 4D cooperation constraints.