# Research on Optimal Landing Trajectory Planning Method between an UAV and a Moving Vessel
## 4 Improving the Accuracy of the Optimal Approach Landing Trajectory  
In order to improve the accuracy of the optimal approach landing trajectory between UAV and vessel, we introduce the pre-position \(n\) in the calculation formula of the direction angle \(\gamma_{A}\) and the dip angle \(\vartheta_{A}\) of the UAV flight speed vector. More precisely, we replace Equation (29) with Equation (35) and calculate the direction angle \(\gamma_{A}\) and dip angle \(\vartheta_{A}\) as follows:  
\[\left\{\begin{array}{c}\gamma_{tr}(i)=arctan\Big{(}\frac{z_{tr}(i+n)-z_{tr} (i)}{x_{tr}(i+n)-x_{tr}(i)}\Big{)}\\ \vartheta_{tr}(i)=arctan\Bigg{(}\frac{y_{tr}(i+n)-y_{tr}(i)}{\sqrt{\left(x_{ tr}(i+n)-x_{tr}(i)\right)^{2}+\left(z_{tr}(i+n)-z_{tr}(i)\right)^{2}}}\Bigg{)}\end{array}\right. \tag{35}\]  
with \(n\) denoting the initial lead steps.  
By selecting the optimal value of the initial lead steps \(n\), the guidance error of the UAV's flying to point \(A_{3}\) can be greatly reduced. For the control system with the above parameters, different pre-step values are evaluated, and the coordinate deviation error \(\Delta X\), \(\Delta Y\), \(\Delta Z\) and the total error \(\Delta S=\sqrt{\Delta X^{2}+\Delta Y^{2}+\Delta Z^{2}}\) between the UAV actual trajectory and the optimal calculated trajectory at the point \(A_{3}\) are shown in Figure 8.  
In Figure 8, \(\Delta Y=0\) is achieved by artificial compensation for systematic errors of \(\Delta Y=14\) m. From the simulation results shown in Figure 8, it can be concluded that the optimal value of the initial  
Figure 8: The relationship between the error \(\Delta X\), \(\Delta Y\), \(\Delta Z\), \(\Delta S\) and the initial lead steps \(n\).  
Figure 7: Direction angle \(\gamma_{tr}\) and dip angle \(\vartheta_{tr}\) of the UAV flight speed vector.  
lead is \(n=187\). At this value, the total error between the actual UAV approach landing trajectory and the vessel at the point \(A_{3}\) is \(\Delta S=14.2\) m and the calculated optimal approach landing trajectory, which is compared with the total error when \(n=1\), is reduced by nearly 3.5 times.  
The direction angle \(\gamma_{tr}\) and the dip angle \(\delta_{tr}\) of the flight speed vector between the UAV and the vessel are shown in Figure 9.  
From the simulation results shown in Figure 9, it can be seen that when the initial lead is \(n=187\), the direction angle \(\gamma_{tr}\) change process of the UAV flight speed vector almost sees the same trend compared with the results of Figure 7, showing a more gradual correction. By contrast, in the calculation process of the complete approach landing trajectory, the flight vector's dip angle \(\delta_{tr}\) changed significantly compared with the results of Figure 7, with the change process at the approach point \(\mathbf{A}_{1}\) and \(\mathbf{A}_{2}\) being smoother. This behavior is considered beneficial to an optimal UAV landing trajectory tracking planning during actual flight.  
By introducing the initial lead in the control signal, it can be concluded that the UAV inertia can be compensated for a certain extent, assuring a more efficient approach landing trajectory.