## 3 Proposed UGAVs-MDVR Protocol
### Level-Based Cluster-Head Election (LBCHE)
IF CL_HEAD = NOT then // CH not elected
3. veh_technology_status = find_veh_type(VZ) // find the resources according to mines detection staff strategy
4. Function calculate_spd_dirct_UGVs(VZ)
5. IF veh_resources_cluster > neigh_vehiles (VZ) // compare UGVs resources with neighboring vehicles
6. then
7. CL_HEAD =VZ // CH election
8. assign vehicle = CL_HD
9. ELSE IF UGVs(Speed && Direction == SIMILAR) && UCVs(Average speed value)==(Speed Threshold value)
10. then
11. CL_HEAD =VZ
12. assign Vehicle = CL_HD
13. ENDIF
14. ELSE IF VZ_CLUSTER = CL_HD //CH maintenance, if elected already
15. Function keep_CLMN (VZ) // maintain CH
16. Function joining_cluster_member(VZ)
17. Function leave_cluster_member(VZ)
18. ELSE
19. set VZ_CL(Existing State= Tempoary_Elect (UAV) //if no existing head then elect UAV as CH
20. END IF

Figure 2: Event message dissemination by UGV to UAV and incoming UGVs. ### Cluster Multicast Routing (MRT)

In cluster-based routing, the packets of 512 bytes are transmitted from the source node to its CH in the first step. Then, the CH forwards the packet to the CH of the destination

Figure 3: Flowchart of UGAVs-MDVR Protocol. node through intermediate CHs. Hence, the record of all CHs and CMs is maintained within the cluster record (CR), which is updated by transmitting cluster advertisements (CADVs) periodically after every 5 s. The CADVs consist of cluster identification, UGV speed, direction, and sequence number. The sequence numbers are used to differentiate between the old and new advertisements. The MRT is defined in Algorithm 3, whereas the message dissemination scheme for all vehicles or only a specific group of vehicles is illustrated in Algorithm 4. The occurrence of network partitioning can be detected through periodic CADVs. If the CADVs are not received for more than 10 s, then it shows the event of network fragmentation. Therefore, the CH election scheme is executed again to handle the CMs and to establish inter-cluster communication through CHs, as shown in Algorithm 5. The CR is updated continuously to add the record of newly elected CHs. The cluster record maintenance and updating process are illustrated as follows in Algorithm 3:

* Speed and direction computation,
* Sequence number update,
* Advertisement dissemination,
* Cluster record update process execution. ```
1:TO complete V\({}_{\text{w}}\) in \(\Phi\)(n) Implement //all UGVs
2:Function calculate_spd_direct_UGVs(V\({}_{2}\)) //speed and direction computation of UGVs
3:Function modify_vehicle_recent(Identity, spd, dirct, UMDVs)
4:Function modify_current_time(Identity, UGVs)
5:Function modify(Identity, UGVs, sequences) //modify sequence number
6:IF time \(\approx\) 5 then //advertisement dissemination periodically
7:Function distribute_CR(Identity, sqn, spd, dirct,v.time, UGVs, UAVs) //CR dissemination
8:END IF
```
**Algorithm 3** CR development for UGVs

The CH election process is executed again for re-cluster head election upon network partitioning. The re-election process keeps the network organized for efficiently disseminating the event detection messages irrespective of the sudden and dynamic changes occurring in the network, as shown in Algorithm 5.