Skip to main content
. 2022 Apr 22;22(9):3236. doi: 10.3390/s22093236
Algorithm 2: Cluster Head Selection Algorithm
Input: cluster numbers K, clusters set CL={CL1,CL2,CLi,CLK}.
Output: cluster head CHi, i=1,2,,K
/*Initialization*/
1: Each UAV node broadcasts a HELLO message to its neighboring set φ.
/*Computation*/
2: for i=1: K
3: for each UAV node jϵ CLi
4: calculate the weight Wj by using Equation (9)
5: end for
6: CLbest=argmaxj{Wj}
7: CHi = CLbest
8: broadcast CHi claim
9: end for