## 4 Design of a Capacity-Constrained Weighted Clustering Algorithm
### CH and BCH Node Selection
Similar to the method for calculating velocity, the average acceleration difference between node \(i\) and all other nodes within its cluster can be expressed as follows:  
\[f_{C_{i}}=\frac{n_{i}}{N_{k}-1} \tag{2}\]5  
\[f_{C_{i}}=\frac{n_{i}}{N_{k}-1} \tag{2}\]6  
\[f_{C_{i}}=\frac{n_{i}}{N_{k}-1} \tag{2}\]7  
\[f_{C_{i}}=\frac{n_{i}}{N_{k}-1} \tag{2}\]8  
where \(a_{i}\) and \(a_{j}\) represent the scalar acceleration values of node \(i\) and \(j\), and \(\beta_{i}\) and \(\beta_{j}\) represent the angles between the accelerations of nodes and the Z-axis, while \(\gamma_{i}\) and \(\gamma_{j}\) represent the angles between the acceleration XY-plane components of nodes and the X-axis. At the same time, since acceleration is perpendicular to velocity, it only changes the direction of the node's motion without altering the magnitude of the velocity, i.e., \(\overrightarrow{v}\cdot\overrightarrow{a}=0\). Therefore, for any node, the angle between the velocity and acceleration directions satisfies the following equation:  
\[f_{C_{i}}=\frac{n_{i}}{N_{k}-1} \tag{2}\]9  
After normalization, the acceleration similarity factor can be expressed as follows:\[f_{E_{i}}=\frac{E_{ir}}{E_{i}} \tag{3}\]0  
where \(a_{\max}\) represents the value of the node's maximum movement speed. Therefore, the mobility similarity factor can be expressed as follows:  
\[f_{E_{i}}=\frac{E_{ir}}{E_{i}} \tag{3}\]1  
where \(\omega_{1}\) and \(\omega_{2}\) are empirical factors, and \(\omega_{1}+\omega_{2}=1\). 4. External interference factor  
In emergency rescue environments, UAVs are often subjected to interference, which can be mainly categorized into two types: energy-based interference and information-based interference. For energy-based interference, when the interference power is low, the communication quality between nodes will decrease; when the interference power is high, it may lead to a complete disruption of the communication link between nodes. In contrast, information-based interference typically does not cause a communication link failure but rather degrades the communication quality by introducing erroneous data, resulting in transmission deviations that affect the accuracy of the data and communication efficiency. When interference causes communication interruption between nodes, the node cannot broadcast Hello messages to other nodes, nor can it receive messages from other nodes. Therefore, it will not be able to participate in the clustering process, nor can it participate in cluster head competition. When interference only leads to a decrease in node communication quality, in order to ensure network fairness, the degree of interference can be measured by the packet error rate of Hello messages periodically broadcast by nodes. Nodes with high packet error rates indicate severe interference and poor communication quality. Therefore, the external interference factor of the node \(i\) can be normalized and represented by the packet error rate of its Hello message, which can be expressed as follows:  
\[f_{E_{i}}=\frac{E_{ir}}{E_{i}} \tag{3}\]2  
where \(m\) is the number of Hello message error packets received by the node \(i\), and \(M\) is the total number of Hello message packets received by the node \(i\). 5. Average distance factor  
In UAV network, the cluster head, as the central node of each cluster, is responsible for inter-cluster and external communication. The initial average distance between the cluster members and the cluster head directly impacts communication delay and energy consumption. A closer cluster head can exchange data with the nodes within the cluster more quickly, thereby improving network efficiency.