## 3 Four-Dimensional Dynamic Cooperative Path Planning Algorithm
### Dynamic Priority RRT* Algorithm
As the UAV approaches the goal, \(\mathbf{F}_{rep1}\) gradually decreases to zero. Therefore, under the effect of the improved potential field resultant force, the UAV will still approach the end node even if there is a threat nearby and finally reach the goal. Furthermore, considering the constraint problem of UAVs, it is necessary to add the constraints of the maximum steering angle \(\phi_{\text{max}}\) and the maximum climbing/diving angle \(\gamma_{\text{max}}\) of UAVs when calculating the resultant force direction. The steering angle constraint condition is \(-\phi_{\text{max}}\leq\Delta\phi\leq\phi_{\text{max}}\) and the constraint of climb/dive angle is \(-\gamma_{\text{max}}\leq\Delta\gamma\leq\gamma_{\text{max}}\). \(\Delta\phi\) and \(\Delta\mu\) are, respectively, the angular changes of the angle between the resultant forces of the current initial step and the next step in the horizontal plane and the vertical plane. #### 3.3.2 Heuristic Sub-Target Strategy

When using the APF for local conflict avoidance planning, the goal is designed as the global minimum of the potential field, so that the UAV moves in the descending direction of the potential field. However, in a complex environment involving other UAVs and various threats, there may be local potential field minima other than the goal which causes the UAVs to enter the local potential field minima by mistake, leading to the failure of path planning. Note that the reason for the local minimum is that the resultant force is zero. Therefore, the ideas to solve this problem are generally divided into three categories: optimization approaches based on control theory [40], changing repulsive potential field [41], and changing attractive potential field [42]. The optimization method based on control theory usually uses the optimal control method to get the UAV out of the trap when encountering the local minimum. However, this paper mainly studies the path planning algorithm of general cooperative UAVs and does not involve the description of some control variables. In addition, changing the repulsion potential field means placing a virtual obstacle between the UAV and the target point to make the UAV quickly disengage from the local minimum. This method has certain advantages in the path planning of a single UAV. However, for local collision avoidance planning of multiple UAVs, adding virtual obstacles may affect the obstacle avoidance planning of multiple UAVs. In other words, this method will force multiple UAVs to re-plan the path to increasing the calculation cost. Similarly, changing the attractive potential field refers to setting virtual sub-target points for the UAV trapped in the local minimum trap to quickly break away from the local minimum by changing the attractive potential field. After the UAV reaches the sub-target point, change the attractive potential field to the final target point to make the UAV continue to fly. This method has the same characteristics as adding virtual obstacles; that is, it is simple to calculate without additional calculation process. Therefore, real-time performance can be guaranteed. Meanwhile, the virtual sub-target point is only effective for the affected UAV, thus eliminating the disadvantage that the virtual obstacle affects other UAVs. However, random setting of sub-target points may lead to high cost of path length or large angle deflection of UAV when escaping from the local minimum. Therefore, in order to further improve the sub-target guidance strategy, this paper proposes a heuristic sub-target strategy to optimize the selection of sub-target points. This strategy designs a cost function that considers both path length and angle constraints, and further optimizes the path on the basis of ensuring that the UAV can escape the local minimum, so as to improve the path quality on the basis of ensuring real-time and reliability.