## 4 Proposed Method
### Coverage Hole Repair Based on Mobile Node Redeployment
#### 4.2.2 Calculate the Number of Mobile Sensors Required  
After rotation, the position of the stationary sensor no longer changes. Before scheduling mobile nodes to repair coverage holes, we first calculate the total length of coverage holes along the repair path. Then, its sensing area is determined based on the given sensor sensing radius and other parameters. Finally, the required mobile sensors for repairing coverage holes can be obtained through simple mathematical calculations. From Figure 3, it can be seen that there is a coverage hole between sensor nodes \(S_{1}\) and \(S_{2}\). \(l_{1}\), \(l_{2}\), and \(l_{3}\) represent the length of holes calculated by different methods. If \(l_{1}\) is chosen as the result, it will cause the calculated length to be greater than the actual length, resulting in redundant coverage. \(l_{2}\) is the shortest distance between two nodes, so \(l_{2}\) is chosen as the final result. We take the point with the largest horizontal axis on node \(S_{1}\)'s sensing sector as the starting point for calculating the length, and the point with the smallest horizontal axis on node \(S_{2}\) as the endpoint for calculating the length. The distance between two points is the length of the coverage hole being calculated. The pseudocode of the proposed method for calculating the number of mobile sensors required is shown in Algorithm 3. By using the obtained length, combined with the sensing radius and sensing area of the sensor, the required number of mobile sensors can be calculated. ```
0:\(R_{S},\delta,S^{\prime}\)
```
0:\(l_{hole}n_{m}\) ```
1:for\(s_{i}\in S^{\prime}\)do
2: Check the coverage of nodes on MEP
3:if the overlapping coverage equals 0 then
4: Calculate the length between \(s_{i}\) and \(s_{i+1}\)
5: Sum up the total length \(l_{hole}\)
6:end
7: Calculate the maximum coverage range of nodes
8: Output the number of mobile sensors \(n_{m}\)
```

**Algorithm 3** Calculating the number of mobile sensors

#### 4.2.3 Redeploying Mobile Sensors

After determining the location of the coverage hole, we need to schedule the mobile sensor to the location of the hole. In the process of scheduling nodes, each hole has multiple eligible mobile nodes as candidates. Therefore, we need to develop a reasonable mobile node selection and redeployment strategy. This strategy aims to achieve coverage hole repair with the minimum number of sensors and minimal moving distance. The process of redeploying mobile nodes is shown in Figure 4 and described as follows. The white sectors in the figure represent stationary sensors, and the blue sectors represent mobile sensors. In the ROI, for repair position \(p_{1}\), select the mobile node with the highest overlap coverage as the candidate node. This approach can avoid new coverage holes and also help reduce redundancy rates. As shown in the figure, \(m_{1}\), \(m_{2}\), \(m_{3}\), and \(m_{4}\) are candidate nodes for repairing position \(p_{1}\). Node \(m_{1}\) is closer to \(p_{1}\), so \(m_{1}\) is the first candidate node. In addition, we should also consider the energy of node \(m_{1}\). If the

Figure 3: Calculation of the length of the uncovered area between sensors. energy consumption generated by node \(m_{1}\)'s moving exceeds the threshold, the candidate qualification of node \(m_{1}\) will be canceled. Then, consider the second candidate node \(m_{2}\). If node \(m_{2}\) meets the requirements, move node \(m_{2}\) to the repair position \(p_{1}\). The pseudocode for redeploying mobile sensors is shown in Algorithm 4.