## 2 Method  
In this work, we consider for the fixed-wing UAV with low-level control the following nonholonomic model in 2D  
\[\begin{cases}\dot{x}=v\cos\varphi\\ \dot{y}=v\sin\varphi,&v_{min}\leq v\leq v_{max}\\ \dot{\varphi}=\omega,&|\omega|\leq\omega_{max}\end{cases} \tag{1}\]  
where \((x,y)\in\mathbb{R}^{2}\) represents the UAV's position, and \(\varphi\in(-\pi,\pi]\) denotes its heading angle. \(v\) represents the forward velocity, and \(\omega\) is the turn rate. The constraints \(v_{min}\) and \(v_{max}\) define the minimum and maximum airspeeds, respectively, while \(\omega_{max}\) limits the turn rate.  
Low-level control systems like the Piccolo autopilot [22] and the MicroPilot autopilot [23] are capable of decoupling the longitudinal and lateral dynamics of small fixed-wing UAVs. This allows us to focus solely on lateral trajectory planning, ensuring compliance with dynamic constraints. The altitude dynamics are omitted, as our primary interest lies in the lateral plane.  
Before delving into the topic of trajectory replanning, it is essential to discuss the generation of a global reference trajectory. In known and structured environments, various methods can be employed to create a global reference trajectory from the starting point to the destination. For instance, one could utilize a topologically feasible straight-line path generated by \(A^{*}\)[24; 25] or \(RRT\)[26; 27] and then refine it into a dynamically feasible trajectory through trajectory optimization [28]. Alternatively, a global trajectory can be pre-defined by experts. These predefined trajectories are generally well constructed but are not equipped to handle unexpected situations, particularly the presence of dynamic obstacles.  
Given a known global trajectory, we can utilize established trajectory tracking algorithms [29; 30] during real-time operations. However, during a fixed-wing UAV mission, moving obstacles may be encountered, such as other non-cooperative aircraft or mobile targets. These obstacles, though not intentionally interfering with our flight path, are unpredictable and their motion trajectories may not be known or easily obtainable in real time. Therefore, our algorithm aims to monitor and predict the motion trajectories of these dynamic obstacles in real time.  
By predicting the movement of these obstacles, we can assess the safety of the global reference trajectory. If a segment of the local trajectory is predicted to collide with a moving target, we can select two points from the global reference trajectory as the start and end points for local trajectory replanning. Subsequently, we perform online trajectory replanning to avoid potential collisions.  
In this work, we represent the waypoints of a trajectory using \(\xi=[x,y,\varphi]^{T}\). Suppose the fixed starting and ending waypoints of the replanned trajectory are \(\xi_{0}\) and \(\xi_{f}\), respectively. We employ a uniform discretization method, sampling the replanned trajectory function between \(\xi_{0}\) and \(\xi_{f}\) at equal time steps of length \(\delta t\). Consequently, our waypoint trajectory representation can be denoted as \(\mathcal{T}\in\mathcal{R}^{3n}\):  
\[\mathcal{T}=\begin{bmatrix}\xi_{1}\\ \xi_{2}\\ \dots\\ \xi_{n}\end{bmatrix} \tag{2}\]  
where each \(\xi_{i}\) represents a waypoint in the trajectory.  
Given this trajectory representation, our objective is to find a local replanned trajectory \(\mathcal{T}\) that can avoid moving obstacles based on the proposed motion prediction algorithm. This replanned trajectory should closely follow the global reference trajectory while maintaining smoothness and dynamic feasibility. In other words, it must satisfy the airspeed and turn rate constraints of the fixed-wing UAV.