Research Article

Industrial Internet of Things Based Efficient and Reliable Data Dissemination Solution for Vehicular Ad Hoc Networks

Algorithm 1

Verifies whether the receiving vehicle (R) is positioned in ideal, normal, or ahead segment of the wagon wheel. It also computes the corresponding waiting time for Ri vehicles to schedule the transmission of received data packet.
(1) Procedure Next Forwarder Vehicle (NFV) Selection
(2) Input: N // all vehicles within Concern Area
(3) Source// vehicle (S) that initiate the data dissemination process
(4) (Tx, Ty)// x and y coordinates of transmitter vehicle (Tj) during 2nd and onward hops
(5) (Rx, Ry)// x and y coordinates of receiver vehicle (Ri)
(6) Output: number of vehicle(s) to carry on data dissemination process// NFV(s)
(7) if the message is received for first time then
(8) Direction Ri to for some threshold value of// Ri  & Tj same/opposite direction
(9) Position Ri to // two argument function atan2 (arctangent function)
(10) Distance Ri to // distance between Ri and Tj
(11) Defaultdelay = 0.01 ×// default delay of Ri
(12) if Ri inside the behind segment i.e. (angle ≥ 181° and angle ≤ 360°) then //waiting time for priority 1 & 2
(13) if Ri inside the ideal segment i.e. (angle ≥ 226° and angle ≤ 324°) then
(14) ; //set waiting time for priority 1
(15) end
(16) else //set the waiting time for and priority 2
(17) ;
(18) end
(19) end
(20) else// if inside the ahead segment, set waiting time for priority 3
(21) ;
(22) end
(23) Ri.; // Ri has to schedule the transmission
(24)end
(25) else
(26) if Scheduled message then // if already scheduled, cancel scheduling and discard
(27)if then// calculate the distance
(28)Discards the received message;
(29) end
(30) end
(31)Cancel message scheduled;
(32) end
(33) end Procedure