View full-text article in PMC Sensors (Basel). 2021 Apr 1;21(7):2443. doi: 10.3390/s21072443 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/). PMC Copyright notice Algorithm 1 Receiving Beacon 1:procedureReceiving_Beacon(beacon* bsm) 2: His_Pos←BSM.SenderPos(); 3: Dist←Calc_Dist(My_Pos,His_pos); 4: if ((Dist<=GeneralNR)OR((Dist<=RoadNR)AND(MyRoadID=HisRoadID)) then 5: His_Speed←BSM.SenderSpeed(); 6: Speed←Max(My_Speed,His_Speed); 7: if (Dist<=CloseNR) then 8: Close←TRUE; 9: end if 10: end if 11: Process_Beacon(BSM); 12:end procedure