# The Improved A* Algorithm for Quadrotor UAVs under Forest Obstacle Avoidance Path Planning
## 4 Discussion  
In order to enhance the safety of UAV autonomous obstacle avoidance and reduce unnecessary flight energy consumption in the plantation forest. Combined with the op \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Environment** & **Algorithm** & \
\begin{tabular}{c} **Path Search** \\ **Time (s)** \\ \end{tabular} &
\begin{tabular}{c} **Path Length** \\ **Turning Angle** \\ \end{tabular} \\ \hline \multirow{4}{*}{1} & Traditional A* & 4.36 & 312.10 & 495.00\({}^{\circ}\) \\  & RRT & 47.92 & 370.82 & 3816.09\({}^{\circ}\) \\  & APF & 78.64 & 299.26 & 1025.95\({}^{\circ}\) \\  & A* in reference [39] & 4.09 & 304.32 & 482.46\({}^{\circ}\) \\  & Improved A* & 3.49 & 294.50 & 44.61\({}^{\circ}\) \\ \hline \multirow{4}{*}{2} & Traditional A* & 2.24 & 239.36 & 315.00\({}^{\circ}\) \\  & RRT & 52.20 & 339 & 3636.93\({}^{\circ}\) \\  & APF & 56.19 & 228.88 & 397.07\({}^{\circ}\) \\  & A* in reference [39] & 1.98 & 237.43 & 157.93\({}^{\circ}\) \\  & Improved A* & 1.35 & 225.64 & 15.40\({}^{\circ}\) \\ \hline \multirow{4}{*}{3} & Traditional A* & 0.48 & 210.60 & 405.00\({}^{\circ}\) \\  & RRT & 35.80 & 360.00 & 4571.42\({}^{\circ}\) \\ \cline{1-1}  & APF & 47.89 & 204.23 & 635.60\({}^{\circ}\) \\ \cline{1-1}  & A* in reference [39] & 0.42 & 206.32 & 508.93\({}^{\circ}\) \\ \cline{1-1}  & Improved A* & 0.31 & 200.53 & 41.85\({}^{\circ}\) \\ \hline \multirow{4}{*}{4} & Traditional A* & 3.23 & 211.54 & 765\({}^{\circ}\) \\  & RRT & 24.92 & 258.00 & 3181.67\({}^{\circ}\) \\ \cline{1-1}  & APF & 46.60 & 197.87 & 601.88\({}^{\circ}\) \\ \cline{1-1}  & A* in reference [39] & 2.21 & 204.99 & 589.46\({}^{\circ}\) \\ \cline{1-1}  & Improved A* & 1.97 & 194.95 & 54.13\({}^{\circ}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Algorithm performance for different starting points and target point positions. erating environment and flight requirements of UAVs, the traditional A* algorithm has been improved through the segmented cost function of weighted processing with the dynamic heuristic function of steering cost, turning points optimization, and smoothing optimization. Through the parameter determination experiment, the optimal combination of weight coefficients for the cost function was obtained as the basis for subsequent experiments. The performance simulation experiment results show that, compared with the traditional A* algorithm with a unified weight, the average number of traversed nodes is reduced by 64.87%, and the data processing time is reduced by 73.77%, indicating that the combination of weight coefficients can effectively reduce the data processing time and the number of node searches, while achieving a better balance between the rate of convergence and the path quality. Furthermore, by introducing the strategy of removing turning points, the redundant nodes (including turning points) in the path were eliminated, further reducing the path length and total turning angle while improving the path's smoothness. Subsequently, the path with redundant turning points removed was smoothed using quasi-uniform cubic B-spline curves, with the fitting degree of the curves controlled to ensure the flight safety of UAVs by maintaining a distance range between the trajectory and obstacles. After smoothing, the final path did not exhibit obvious turning points, and the path length and total turning angle were further reduced. On average, the shortest path length is reduced by 12.52%, the total turning angle is reduced by 54.53%, and the total time spent is reduced by 49.64%, meeting the requirements of low energy consumption, high efficiency, and high safety for UAV flight in plantation forests. The comparison experiments of various algorithms conducted in the plantation forest map revealed that, among the selected algorithms, the RRT algorithm yielded the longest path length and largest total turning angles and consumed a considerable amount of time, thus exhibiting lower overall efficiency.