## 4 Routes Knowledge Exploitation
### Route Classification  
Classifying a set of vessel positioning observations into specific routes is crucial for augmenting the situational awareness over the maritime traffic area. Route classification assigns a probability to each route compatible to the vessel position. This is expressed as the posterior probability that the vessel belongs to that specific route, having observed a partial vessel track. Generally speaking, a vessel track, **V**, is a time series of \(T\) observed state vectors, **v\({}_{i}\)**:  
\[\textbf{V}=\{\textbf{v}_{1},\textbf{v}_{2},\ldots,\textbf{v}_{T}\} \tag{1}\]  
where the state vector observation, **v\({}_{t}\)**, is directly isolated from the broadcast AIS information. In this study, it includes both position and velocity information as extracted by the vessel track properties, \(v.track\) (see Section 3):  
\[\textbf{v}_{t}=[x_{t},y_{t},\dot{x}_{t},\dot{y}_{t}]^{\intercal} \tag{2}\]  
where \(x_{t}\) and \(y_{t}\) are related to the vessel coordinates and the velocity components, \(\dot{x}_{t}\) and \(\dot{y}_{t}\), are derived by combining SOG and COGinformation, based on the conditions: SOG\({}_{t}=\sqrt{\dot{x}_{t}^{2}+\dot{y}_{t}^{2}}\) and COG\({}_{t}=tan^{-1}\left(\frac{\dot{y}_{t}}{\dot{x}_{t}}\right)\)  
The vessel track, **V**, can be associated to a time series of regions, \(\bar{\textbf{S}}=\{\textbf{s}_{1},\textbf{s}_{2},\ldots,\textbf{s}_{T}\}\), spatially identified by circles of radius \(d\) centered in the observed positions, \([x_{t},y_{t}]\), which represent the temporal sequence of states and take into account the time lags, \(\Delta_{t}\), between subsequent observations. The spatial region identified by the \(t-th\) state, \(\textbf{s}_{t}\), as further discussed hereafter, can be used as a mask to capture the route elements in the neighborhood of the observation, **v\({}_{t}\)**, subsequently used to characterize the local route behavior. It is clear that the selection of the distance, \(d\), and, therefore, the size of the state regions, affect the route classification effectiveness: if \(d\) is too small, the characterization of the local route behavior would be based on a reduced number of neighbors, leading to poor generalization capabilities. Similarly, if \(d\) is too large, the characterization would be biased by the mixing of different behaviors (e.g., as in the case of non-rectilinear routes). This is illustrated by Figure 10.  
It has been found that state regions with a radius \(d\) in the order of a few nautical miles lead to acceptable classification results independently of the route spatial and directional dispersion. Each AIS message can be decoded to derive the vessel type, \(c\), according to the categorization in [39]. The classification problem lies in finding the route, \(R_{c}^{k^{*}}\), that maximizes the posterior probability, \(P(R_{c}^{k}|\textbf{V},\bar{\textbf{S}})\), over the \(k=1,...,K\) possible compatible routes \(R_{c}^{k}\in Rs\) (see Section 3):  
\[R_{c}^{k^{*}}=\operatorname*{arg\,max}_{k}\,P(R_{c}^{k}|\textbf{V},\bar{\textbf {S}}) \tag{3}\]  
where, following the Bayes rule, \(P(R_{c}^{k}|\textbf{V},\bar{\textbf{S}})\), can be decomposed as follows:  
\[P(R_{c}^{k}|\textbf{V},\bar{\textbf{S}})\propto P(\textbf{V},\bar{\textbf{S}}| R_{c}^{k})P(R_{c}^{k}) \tag{4}\]  
**Figure 10.** Example of observed vessel track, \(\{\textbf{v}_{t-2},\textbf{v}_{t-1},\textbf{v}_{t}\}\) (red), associated temporal state sequence, \(\{\textbf{s}_{t-2},\textbf{s}_{t-1},\textbf{s}_{t}\}\) (circles) and points (blue) of a compatible route, as resulting from the traffic knowledge discovery process. If the selected radius is too large (e.g., \(d^{\prime}>d\)), distinct local directional distributions can be included into the same state, biasing the motion characterization of the relevant observation neighborhood and, thus, the route classification process.