-
1:
procedureOn_bcn_Reception(beacon* bsm) ▹ for each vehicle receiving a beacon from
-
2:
Calculate the temporary distance between and ;
-
3:
if
then ▹ if is a potential delimiter
-
4:
if
then ▹ if is in the privacy neighbors radius
-
5:
; ▹ insert in
-
6:
end if
-
7:
if ( and are on the same road) then
-
8:
if (( and are on the same direction) AND ( is in front of )) then
-
9:
if (( and are on the same lane) AND ( is > than )) then ▹ trying to obtain the farthest same lane front delimiter
-
10:
▹ which is
-
11:
▹ updating
-
12:
▹ updating
-
13:
else if ( is > than ) then ▹ and are not on the same lane
-
14:
▹ which is
-
15:
▹ updating
-
16:
▹ updating
-
17:
end if
-
18:
else if (( and are on the same direction) AND ( is behind of )) then
-
19:
if (( and are on the same lane) AND ( is > than )) then ▹ trying to get the farthest same lane rear delimiter
-
20:
▹ which is
-
21:
▹ updating
-
22:
▹ updating
-
23:
else if ( is > than ) then ▹ and are not on the same lane
-
24:
▹ which is
-
25:
▹ updating
-
26:
▹ updating
-
27:
end if
-
28:
end if
-
29:
end if
-
30:
end if
-
31:
▹ increment the n_Neighbor number of
-
32:
-
33:
end procedure