# A Data-Driven Intermittent Online Coverage Path Planning Method for AUV-Based Bathymetric Mapping
## 3 Proposed Method
### Intermittent Path Planning Method  
An objective function is proposed to quantify the \"rewards\" for each candidate transect. It consists of three components: exploration preference (E), sonar sensing performance (S) and coverage gain (C). As indicated in Equation (2), the successive transect, \(j^{\star}\), is selected by the maximum value from the objective function.  
\[j^{\star}=argmax_{j}(W_{e}E^{j}+W_{s}S^{j}+W_{c}C^{j}) \tag{2}\]  
where \(j\) is the candidate transect as described in Figure 2, and \(W_{e}\), \(W_{c}\), \(W_{s}\) are weights that can be adjusted, but subject to \(W_{e}+W_{c}+W_{s}=1\). \(E^{j}\), \(C^{j}\) and \(S^{j}\) are rescaled values, ranging from 0 to 100. \(E^{j}\) is the exploration reward, \(S^{j}\) is the sonar sensing reward and \(C^{j}\) is the coverage gain reward. They will be specifically discussed in the later subsections.  
It should be noted that the transects do not necessary cross the overall workspace. We exclude the covered segments near the endpoints to reduce extra trajectory, as shown in Figure 3. The width of segments equals the predicted swath width which is the minimum observed swath width from the collected sonar data during the survey. The excluded rectangles should contain as many covered cells as possible and there should be no void cells in them. The resultant waypoints for the j-th transect is defined as \(\mathbf{W}^{j}=[<x_{1}^{j},y_{1}^{j}>,<x_{2}^{j},y_{2}^{j}>]\). For zonal transects, the two waypoints have the same y-coordinate, \(y_{1}^{j}=y_{2}^{j}=y^{j}\) and for meridional transects, the two waypoints have the same x-coordinate \(x_{1}^{j}=x_{2}^{j}=x^{j}\).  
Figure 2: The conception of the proposed CPP method. The vehicle will plan the successive pair of waypoints after one transect is finished. Different colors of the terrain represent different depths, as illustrated in the sidebar.  
After the waypoints has been generated, the transition sequence will be determined based on their distance to the current vehicle position. The vehicle will move towards the closer waypoint first then follow the transect moving towards the other waypoint. The algorithmic representation of the path planner is summarized in Algorithm 1.  
```
Input : Target region \(R_{x}\), sonar data \(S_{p}\), minimum swath width \(min(S_{k})\), vehicle position and pose, grid size \(\Delta x\) Output : Successive pair of waypoints
1 decompose \(R_{x}\) into square cells with given \(\Delta x\), the workspace generated is named \(W_{x}\);
2 whilecoverage rate < preset goaldo
3 project \(S_{p}\) into \(W_{x}\);
4 for\(j=x_{min}:x_{lim}\)do
5 calculate \(E^{j},C^{j},S^{j}\);
6 rescale \(E^{j},C^{j},S^{j}\) to 0 - 100;
7
8 end for
9 for\(j=y_{min}:y_{lim}\)do
10 calculate \(E^{j},C^{j},S^{j}\);
11 rescale \(E^{j},C^{j},S^{j}\) to 0 - 100;
12
13 end for
14 solve \(j^{\star}=argmax_{j}(W_{x}E^{j}+W_{c}C^{j}+W_{s}S^{j})\);
15 determine the waypoints from\(j^{\star}\);
16 choose the starting point from the two waypoints;
17
18 end for
```  
**Algorithm 1**function pathplanner  
Figure 3: Conception of reducing transect length by examining the current observation and the predicted observation condition in a candidate transect. The transversal width of the predicted coverage is determined to be the minimum swath width observed during the mission, \(min(S_{k})\).