# Research on Optimal Landing Trajectory Planning Method between an UAV and a Moving Vessel
## 3 Initial Error Estimation of an UAV Autonomous Guidance System  
### Optimal Approach Landing Trajectory Simulation between an UAV and a Vessel  
For each landing trajectory (I, II, and III), the calculation of the landing trajectory coordinates between the UAV and the vessel is independent of each other. For the trajectory I, the \(i\) point coordinates \((x_{1}(i),\ \ z_{1}(i))\) of the approach landing trajectory are calculated according to the iterative Formula (23).  
\[\left\{\begin{array}{l}x_{1}(i)=x_{\mathrm{C1}}+Rcos\varphi(i)\\ z_{1}(i)=z_{\mathrm{C1}}+Rsin\varphi(i)\end{array}\right. \tag{23}\]  
where the value \(\varphi(i)=\varphi(i-1)+\Delta\varphi\), \(i=2\), \(3\), \(\ldots\), \(\Delta\varphi=\omega_{y}\Delta t\), \(\Delta t\) is set. \(\varphi(0)\) is the initial angle value of turning circular arc rotated according to the UAV speed vector.  
If the descent angle in the vertical plane \(\vartheta_{tr}\) is constant, then it can be defined as the ratio of the height difference between the UAV and the vessel to the horizontal distance between the UAV and the vessel:  
\[\tan(\vartheta_{tr})=\frac{y_{A3}-y_{A0}}{\sqrt{\left(x_{A3}-x_{A0}\right)^{2 }+\left(z_{A3}-z_{A0}\right)^{2}}} \tag{24}\]  
For each approach landing trajectory, the following relationship is used:  
\[\left\{\begin{array}{l}y_{1,2,3}(i)=y_{1,2,3}(i-1)+\Delta y,\ \ i=2,\ 3,\ \ldots\\ \Delta y=\sqrt{\left(x_{1,2,3}(i)-x_{1,2,3}(i-1)\right)^{2}+\left(z_{1,2,3}(i )-z_{1,2,3}(i-1)\right)^{2}}tan(\vartheta_{tr})\end{array}\right. \tag{25}\]  
The termination condition for the I approach landing trajectory is:  
\[\frac{\left|x_{1}(i)-x_{A1}\right|+\left|z_{1}(i)-z_{A1}\right|}{2}\leq\varepsilon \tag{26}\]  
using the \(\varepsilon\) given value. When the termination condition (26) is satisfied, the number \(i_{1}\) of calculation points of the I landing trajectory is considered as \(i_{1}=i\).  
For the II (straight) landing trajectory, the coordinates \((x_{2}(i),\ \ z_{2}(i))\) of the \(i\) point of the approach landing trajectory are calculated according to the iteration Formula (27).  
\[\left\{\begin{array}{l}x_{2}(i)=x_{A1}+iV_{A}\Delta tcos\varphi_{A2}\\ z_{2}(i)=z_{A1}+iV_{A}\Delta tsin\varphi_{A2}\end{array}\right. \tag{27}\]  
where \(i=1,\ 2,\ \ldots\)  
The termination condition for the approach landing trajectory II is:  
\[\frac{\left|x_{2}(i)-x_{A2}\right|+\left|z_{2}(i)-z_{A2}\right|}{2}\leq\varepsilon \tag{28}\]When the termination condition is met, the number of calculation points for the approach landing trajectory II is \(i_{2}=i\).  
The calculation of the coordinates \((x_{3}(i),\;\;z_{3}(i))\) of landing trajectory III is similar to the calculation of the coordinates of landing trajectory I, and the number of points calculated on the path is \(i_{3}\).  
Similarly, the calculation of the coordinates \((x_{4}(i),\;\;z_{4}(i))\) of landing trajectory IV is analogous to the calculation of the coordinates of landing trajectory II. Since the UAV flies to a fixed position of the landing device in a self-guided way on the trajectory IV, the trajectory IV is out of the scope of this paper. In summary, the feasibility of the UAV approaching landing trajectory studied in this paper is restricted by the landing trajectory III. The actual error of the trajectory III will determine the initial error of the UAV autonomous guidance system.  
In this work, the complete approach landing trajectory coordinate array consists of the corresponding array of trajectory coordinates of each trajectory segment, namely: \(A_{tr}=[A_{1}(1:i_{1},\;1:i_{1}),\;A_{2}(1:i_{2},\;1:i_{2}),\;\;A_{3}(1:i_{3}, \;1:i_{3})]\).