## 3 Simulation Results  
This section presents the simulation results of our approach in a typical mission scenario involving a fixed-wing UAV. We assess the algorithm's ability to predict and avoid collisions with moving obstacles. In this scenario, the UAV operates with a minimum speed of \(v_{min}=15\) m/s and a maximum speed of \(v_{max}=25\) m/s, with a maximum turn rate of \(\omega_{max}=1\) rad/s. The moving obstacles, assumed to be other UAVs not actively pursuing the vehicle, must maintain a safe distance of \(d_{safe}=10\) m to avoid collisions. First, we conducted a series of four cases to evaluate the effectiveness of our trajectory prediction method. In these cases, a moving obstacle is simulated, starting from the position \((0m,0m)\) with an initial airspeed of 20 m/s. The obstacle's initial heading angle and turn rate vary across the four cases. To replicate real-world conditions, random noise is introduced to both the obstacle's velocity and turn rate throughout its trajectory. Initially, we employ the KMP to learn the motion pattern, utilizing a Gaussian kernel with hyperparameters \(\lambda_{\xi}=0.1\) and \(\lambda_{\Sigma}=0.1\). Subsequently, we integrate the KMP with the CVM, where the covariance matrix is defined as \(Q_{i}=0.01*I_{3}\). Using this combined approach, we predict a sequence of state transitions. The results, presented in Figure 1, compare the trajectory predictions with a 5 s prediction horizon. Our method demonstrates superior accuracy, with predictions closely aligning with the actual trajectory, thereby outperforming both the KMP and CVM individually. To provide more intuitive comparisons, we use the root mean square error (RMSE) as the metric. The RMSE is computed by the following equation:  
\[RMSE=\sqrt{\frac{1}{N^{0}}\sum_{i=1}^{N^{a}}\|\xi_{i}^{o}-\hat{\xi}^{lo}\|^{2}} \tag{30}\]  
where \(N^{o}\) is the length of the predicted trajectory, and \(\xi_{i}^{o}\) and \(\hat{\xi}^{lo}\) are the \(i\)-th true and predicted trajectory waypoints, respectively. The comparison results across the four cases are shown in Figure 2, demonstrating that the proposed method significantly outperforms both the KMP and CVM. Figure 1: Trajectory predictions using the CVM (light green), the KMP (yellow), and our method (magenta). The obstacle’s trajectory is shown in blue, with the solid and dashed lines indicating the historical and ground-truth trajectories, respectively. Next, we evaluate the effectiveness of our gradient-based trajectory replanning optimization. In the simulation, the moving obstacle starts from the state \([0,0,0]^{T}\) with a velocity of \(20\) m/s and a turn rate of \(-0.2\) rad/s. As in previous cases, random noise is introduced to both the obstacle's velocity and turn rate throughout its motion. The reference trajectory begins from the state \([140,45,-2.24]^{T}\), with a velocity of \(20\) m/s and a turn rate of \(0.1\) rad/s. In this scenario, a collision with the moving obstacle is imminent if the UAV does not replan its trajectory. We set the parameters \(\lambda_{s}=\lambda_{c}=\lambda_{d}=\lambda_{k}=1\), \(\lambda_{r}=0.01\), \(\alpha_{c}=\alpha_{v}=\alpha_{\omega}=0.1\), and \(M_{s}=M_{r}=I_{3}\). Using our fusion prediction method, we predict the moving obstacle's future position over the next \(5\) s and optimize our local trajectory based on these predictions. Trajectory replanning optimization is performed at the \(5\) s mark. The current waypoint serves as the starting point of the replanned trajectory, while the waypoint \(5\) s ahead serves as the end point. The results, illustrated in Figure 3, show that our approach yields the most accurate results. The red path represents the reference trajectory, and the orange path represents the replanned trajectory, which successfully avoids the moving obstacle based on the current predictions. Additionally, we present the distance between the moving obstacle and the UAV in Figure 4, along with the UAV's speed and turn rate in Figures 5 and 6, respectively.