Skip to main content
. 2021 Jul 28;21(15):5120. doi: 10.3390/s21155120
Algorithm 1: Finding the nearest vehicle with which to communicate
Input: Number of vehicles in the transmission area (V), emergency vehicle position, emergency vheicle transmisson power (PE), channel fade coefficient (hEVN), different interfence devices, interference transmission power (PD, PC, Pvi), interference channel fade coefficient (hDVN, hCVN, hVVN), channel noise (N), the required outage probability (poutEVN), and the path loss exponent (α)
Output: Finding the nearest vehicle with which to communicate
1: Establish the required poutEVN
2: for different values of PE, PD, PC, Pv, hEVN, hDVN, hCVN, hVVN, α do
3: Determine the nearest receiving vehicle using
 dEVNmax=(SINRth(PD|hDVN|2 PLDVN+PC|hCVN|2 PLCVN+Pvi|hVVN|2 PLVVN+N)PE|hEVN|2 PLO ln(1poutEVN))1α
4: Send emergency message to the nearest receiver directly
5: end for