# An Efficient Opportunistic Routing Based on Prediction for Nautical Wireless Ad Hoc Networks
## 3 The Proposed Algorithm  
### Network Model  
In our previous work on NANETs [2], a utility function for the connected MANETs was used to find the shortest route, in order to save network resources. However, for OppNets, a blind forwarding strategy leads to transmission delays and increased routing overhead. Therefore, improving packet routing efficiency for OppNets is our target in this paper. In this paper, vessels acting as networking nodes are arbitrarily deployed over the sea. Each networking node with a communication function can transmit messages to another when the distance between nodes is within the corresponding communication range. For example, as illustrated in Figure 1, there is a communication requirement from source node \(S\) to destination node \(D\). The circle denoted by \(C(S,R_{S})\) represents the transmission range of node \(S\), and node \(S\) can transmit messages with node \(i\) (\(i\in\{1,2,\ldots,N\}\)) when \(d_{Si}\leq R_{S}\), where the Euclidean distance \(d_{Si}\) is calculated between node \(S\) and node \(i\), and \(R_{S}\) is the communication radius of node \(S\). Similarly, the circle \(C(D,R_{D})\) denotes the transmission range of node \(D\), and \(R_{D}\) is the communication radius of node \(D\). If the direct relay node of source node \(S\) is destination node \(D\), the packets are directly delivered to node \(D\) (e.g., \(t=t_{1}\) in Figure 1). Otherwise, the packets are further forwarded by future relay nodes (e.g., \(t=t_{1}^{\prime}\) in Figure 1) until they reach the destination node. However, not all relay nodes in the communication range can participate in message forwarding; therefore, in order to improve the efficiency of packet relaying, the candidate intermediate region is defined as follows. **Definition 1**. : _The intersection region of two communication circles with radii \(R_{S}\) and \(R_{D}\) centered on node \(S\) and node \(D\) of \(C(S,R_{S})\) and \(C(D,R_{D})\), respectively, is defined as the candidate intermediate region of node \(S\) for sending a message to destination node \(D\), as illustrated in Figure 2 (sector SAB)._  
Only a node in the candidate intermediate region is likely to be selected as a relay, and therefore the node degree of the carrier node is defined as the number in the transmission range of the carrier node. However, it is noted that not all the candidate intermediate nodes  
Figure 1: An example of packet routing with node mobility. Figure 2: The network model for opportunistic routing. can forward data messages in WRSP; thus, the intermediate node degree of carrier node is defined as follows. **Definition 2**. : _Assume the node \(i\) has an initial location \((X_{i},Y_{i})\) and is moving with speed \(V_{i}\) and direction \(\theta_{i}\) at time \(t_{cur}\). The speed and direction vary by random variables \(V_{\zeta}\) and \(\theta_{\sigma}\) in a time interval \(\Delta t\). In addition, \(V_{\zeta}\in[0,10\ km/h]\) and \(\theta_{\sigma}\in[-30^{\circ},30^{\circ}]\). The position of the node \(i\) after time interval \(\Delta t\) is expressed as:_  
\[ \begin{split} X_{i}^{p}&=X_{i}+(V_{i}+randi(V_{ \zeta}))cos(\theta_{i}+randi(\theta_{\sigma}))\Delta t\\ Y_{i}^{p}&=Y_{i}+(V_{i}+randi(V_{\zeta}))sin(\theta _{i}+randi(\theta_{\sigma}))\Delta t\end{split}  \tag{1}\]  
_where \(X_{i}^{p}\) and \(Y_{i}^{p}\) are the predicted coordinates._  
The candidate intermediate region of node \(S\) is defined as \(CR_{S\to D(S,\,d_{DS})}\), which is given by: \(CR_{S\to D(S,\,d_{DS})}=\{1,2,\ldots,i,\ldots,N|d_{Di}\leqslant d_{DS}\}\), where \(d_{Di}\) is the Euclidean distance between node \(D\) and node \(i\). Moreover, the next time interval of neighbors should meet the criterion \(\{d_{Di}^{p}\leqslant d_{Di}\}\), where \(d_{Di}^{p}\) is the predicted Euclidean distance between node \(D\) and next predicted location of node \(i\). As an example, in Figure 2, the intermediate nodes of node \(S\) are neighbor \(1\) to neighbor \(6\).