## 3 Simulation Results
As shown in these figures, our replanned trajectory consistently maintains a safe distance from the moving obstacle, while the airspeed and turn rate remain within the UAV's physical limits. Figure 2: The quantitative comparison results between the proposed method, KMP, and CVM for the four cases using the metric RMSE. Figure 4: The distance between the obstacle and the UAV for the reference trajectory (blue dashed line) and the replanned trajectories using our method and the two other optimization methods (without the collision term and dynamic term) over time. Figure 3: The trajectory replanning results at 5 s. The orange line represents the replanned trajectory using our method, while the purple and green lines show the ablation results using the gradient optimization method without the collision term and dynamic term, respectively. The figure also displays the reference trajectory (red), obstacle trajectory (blue), and predicted obstacle trajectories using the CVM, the KMP, and our fusion prediction method. To further validate the safety and dynamic feasibility of our algorithm, and to understand the contribution of its different components, we performed an ablation study by individually removing the collision term and dynamic term from the optimization process. The results of this study are also shown in Figures 3-6. It is evident that, without the collision term, the distance between the UAV and the obstacle falls below the safe threshold. In contrast, without the dynamic term, the trajectory maintains a safe distance but fails to keep the speed and turn rate within the UAV's physical limits, leading to a dynamically infeasible trajectory. This ablation study highlights the importance of each component of our algorithm, demonstrating its overall efficiency and effectiveness. Figure 5: The speed of the reference trajectory and the replanned trajectories using our method and the two other optimization methods (without the collision term and dynamic term) over time. Figure 6: The turn rate of the reference trajectory and the replanned trajectories using our method and the two other optimization methods (without the collision term and dynamic term) over time. Furthermore, we evaluated whether the proposed algorithm can ensure UAV safety in the presence of multiple moving obstacles. During the process of avoiding the first obstacle, a second obstacle was detected. This prompted a second round of online trajectory optimization, where the avoidance of both moving obstacles was considered. The optimized trajectory is shown in Figure 7, where the black trajectory represents the result after the second replanning. As seen, the UAV successfully avoided both the first and second obstacles. The distance between the two moving obstacles and the UAV is illustrated in Figure 8, further demonstrating the effectiveness and safety of our algorithm. Figure 8: The distance between the two obstacles and the UAV for the reference trajectory and the second replanned trajectory using our method and original replanned trajectory over time. Figure 7: The trajectory replanning results at 8 s in the presence of two moving obstacles. The black line represents the optimized trajectory using our method.