# Trajectory Prediction of Marine Moving Target Using Deep Neural Networks with Trajectory Data
## 3 Materials and Methods
### Multi-Dimensional Trajectory Features  
The trajectory data are a set of time series data for a single marine ship, including observation time and position information. The trajectory data can be expressed as Equation (1):  
\[\text{TD}=\{\text{TR}_{1},\text{TR}_{2},\cdots,\text{TR}_{k},\cdots,\text{TR}_{k }\},k\in[1,K] \tag{1}\]  
where \(\text{TR}_{k}\) is a trajectory sequence consisting of several trajectory points in chronological order, which can be expressed as Equation (2):  
\[\text{TR}_{k}=\Big{\{}P_{k1},P_{k2},\cdots,P_{kq},\cdots,P_{kQ_{k}}\Big{\}},q \in[1,Q_{k}] \tag{2}\]  
where \(P_{kq}\) is the \(q\)th trajectory point in \(\text{TR}_{k}\), and \(Q_{k}\) is the length of the trajectory \(\text{TR}_{k}\) which may be different for different trajectories. \(P_{kq}\) consists of the time and position, which can be expressed as Equation (3):  
\[P_{kq}=\Big{[}t_{kq},\lambda_{kq},\ \ \varphi_{kq}\Big{]} \tag{3}\]  
where \(t\,\lambda\,\ \ \varphi\), respectively, represent time, longitude, and latitude. The original trajectory is divided into several equal-length segments as experimental samples to realize trajectory prediction. Take the length of trajectory segments as \(s\). A sliding window with a fixed length \(s\) is used to slide through \(\text{TR}_{i}\), which ultimately divides \(\text{TR}_{k}\) into a series of trajectory sequences with a fixed length \(s\), which can be expressed as Equation (4):  
\[\text{T}_{i}=\big{\{}P_{1i},P_{22},\cdots,P_{ij},\cdots,P_{is}\big{\}},j\in[1,s] \tag{4}\]  
where \(P_{ij}=\big{[}t_{ij},\lambda_{ij},\varphi_{ij}\big{]}\). So \(\text{T}_{i}\) can be expressed as a two-dimensional matrix as Equation (5):  
\[T_{i=}\left[ \begin{array}{ccc}t_{i1}\,\ \lambda_{i1},&\varphi_{i1}\\ \vdots&\vdots&\vdots\\ t_{ij}\,\ \lambda_{ij}\,&\varphi_{ij}\\ \vdots&\vdots&\vdots\\ t_{is},\ \lambda_{is}\,&\varphi_{is}\end{array} \right]=\big{(}t_{ij}\,\ \lambda_{ij}\, \varphi_{ij}\big{)}_{s\times 3}j\in[1,s] \tag{5}\]  
The research in Ref. [5] finds that it is nontrivial to directly apply neural networks to the input trajectories to obtain quality representations because of the varying qualities and sampling frequencies of the given trajectories. Furthermore, a naive strategy that considers each trajectory as a sequence of three-dimensional records (time, latitude, longitude) leads to strong oscillations and the non-convergence of parameters during model optimization. In addition, the position is closely related to velocity, and the velocity of large ships usually does not change dramatically during the voyage [9]. Therefore, velocity is a key factor for position prediction. However, the original observation track data include time and position information, while other important motion characteristics, such as velocity and acceleration, are all missing. Moreover, the future navigation status of the ship is closely related to the past and present status, and it is very meaningful to extract the characteristics of velocity and acceleration based on the original track data. Hence, we calculate the related motion characteristics to extend feature space. The velocity information here is expressed as the relative change of position in latitude and longitude divided by the relative time. The acceleration information is expressed as the velocity change in latitude and longitude divided by the relative time. In this paper, the position displacement of the adjacent moment is calculated as Equation (8). The change in position along latitude and longitude relative to adjacent time acting as the velocity of the ship is computed as Equation (10), and the change in velocity relative to adjacent time acting as the acceleration is computed as Equation (11). In addition, in order to eliminate the variation of the initial position of the trajectory, the track changerelative to the initial moment is calculated as Equation (7) to obtain the relative topological information of the trajectory and maintain spatial invariance.