## 3 SLD-GEDIR Protocol
### One-Hop Link Quality Prediction under Non-Shadowing and Shadowing Environment Conditions  
In SLD-GEDIR, each vehicle possesses the city road map and knows the past movement of the other vehicles. Therefore, the quality of links between sender vehicles and segment vehicles can be estimated. To predict the link quality, first, the two-ray ground reflection model has been considered. The shadowing model which is more suitable for vehicular environment has also been considered in the last paragraph of this section. The received power between two vehicles according to the two-ray ground reflection model is given in Equation (14):  
\[PW_{r}=\frac{PW_{t}G_{t}G_{r}H_{t}^{2}H_{r}^{2}}{d_{link}^{4}l} \tag{14}\]  
where \(PW_{r}\) and \(PW_{t}\) are the received and transmitted power respectively, \(G_{t}\) and \(G_{r}\) are the antenna gain of transmitter and receiver, \(H_{t}\) and \(H_{r}\) are the height of transmitter and receiver antenna, \(d_{link}\) is the link distance between vehicles and \(l\) is the system loss. In practice, received power is not the only parameter used to determine link quality. Signal-to-noise ratio \(SNR_{link}\) of the link, which is given in Equation (15), is also an important parameter:  
\[SNR_{link}=\frac{a^{2}PW_{r}}{PW_{th}+a^{2}PW_{inf}} \tag{15}\]  
where, \(a\) is the amplitude of the fading channel with Rayleigh distribution, \(PW_{th}\) is the thermal noise power, and \(PW_{inf}\) represents the interference power. By using Binary Phase Shift Keying (BPSK) modulation, the Bit Error Rate (\(BER_{link}\)) of the link is given in Equation (16) [54]:\[BER_{link}=\frac{1}{2}\Bigg{(}1-\sqrt{\frac{SNR_{link}}{1+SNR_{link}}}\Bigg{)} \tag{16}\]  
The Packet Error Rate \(PER_{link}\) over a one hop link is computed as expressed in Equation (17):  
\[PER_{link}=\{1-(1-BER_{link})^{L}\}+\{f_{m}(n)\} \tag{17}\]  
where, \(L\) is the length of the packet in bits and \(f_{m}(n)\) is the vehicle mobility function. The first term of Equation (17) _i.e._, \(\{1-(1-BER_{link})^{L}\}\) represents a general packet error rate caused by link failure that does not include failure due to mobility. The second term of Equation (17) _i.e._, \(\{f_{m}(n)\}\) is the heuristic function used to predict packet error probability due to sudden directional changes of the vehicles. The function \(f_{m}(n)\) has a past knowledge component and a future heuristic component. The function \(f_{m}(n)\) is expressed in Equation (18):  
\[f_{m}(n)=1-\left(\frac{1}{g(n)+h(n)}\right) \tag{18}\]  
where, \(g(n)\) represents the number of directional changes taken by the vehicle in the past and \(h(n)\) denotes the number of directional changes expected by the vehicle in future to reach the destination using the shortest available route. As soon as the total number of directional changes \(\{g(n)+h(n)\}\) increases, the value of vehicle mobility function \(0\leq f_{m}(n)\leq 1\) also increases. In case of transmission failure, a packet is retransmitted. A packet can be successfully transmitted at least once in N retransmissions. The probability of successful transmission can be expressed as \(\sum_{i=0}^{N}(1-PER_{link})PER_{link}^{i}\). Each retransmission effort has been denoted by \(i\). Therefore, the Packet Error Rate \(PER_{link}^{N}\) over one-hop link with \(N\) retransmissions can be expressed by Equation (19):  
\[PER_{link}^{N}=1-\sum_{i=0}^{N}(1-PER_{link})PER_{link}^{i} \tag{19}\]  
Packet Error Rate \(PER_{link}^{N}\) of a path with \(N\) retransmissions in each one-hop link and that is made up of \(k\) number of one-hop links can be computed as given in Equation (20):  
\[PER_{path}^{N}=1-(1-PER_{link}^{N})^{k} \tag{20}\]  
The \(PER_{link}^{N}\) can be calculated using either Equation (19) or (20) with \(k=1\). One-hop link quality prediction between vehicles in vehicular traffic environment can be made more realistic by incorporating the impact of shadowing on received power \(PW_{r}\) as shown by Equation (7).