# A Data-Driven Intermittent Online Coverage Path Planning Method for AUV-Based Bathymetric Mapping
## 3 Proposed Method
### Sonar Sensing Reward  
The sonar sensing reward is introduced to choose the proper transects that will result in better sonar confidence. The beams of multibeam sonars distribute uniformly in the profiling sector, whereas their echoes from the bottom terrain are not even. They are affected by the ray angle of a specific beam related to the centerline, \(\alpha\), and the composition of sediments [9]. As the latter factor has a random effect to each part of a region, herein, we only consider the former factor. Assuming the bottom is flat, the footprint of a circular beam will be an ellipse if \(\alpha\) is not zero, and the area of the ellipse increases with \(\alpha\), as shown in Figure 4. According to [9], larger footprint will result in higher uncertainty. Assuming the footprint area is \(A_{0}\) when \(\alpha\) is zero, and the area increases to \(A_{\alpha}\) at a specific \(\alpha\). The sensing confidence, \(S(\alpha)\), could be computed by dividing \(A_{0}\) by \(A_{\alpha}\), where \(A_{0}\) is  
\[A_{0}=\pi\cdot(h\cdot tan(\beta))^{2} \tag{4}\]  
where \(\beta\) is the half beamwidth and \(h\) is the altitude. The area of the elliptical footprint \(A_{\alpha}\) can be calculated by:  
\[A_{\alpha}=\pi\cdot e_{a}\cdot e_{b} \tag{5}\]  
where \(e_{a}\) and \(e_{b}\) are the half length of the major and minor axis, respectively. Their values can be derived by projective geometry method.  
\[e_{a}=(h\cdot tan(\alpha+\beta)-h\cdot tan(\alpha-\beta))/2 \tag{6}\]  
\[e_{b}=h\cdot tan(\beta)/cos(\alpha) \tag{7}\]  
Figure 4 depicts the sensing confidence \(S(\alpha)\) with assumed values, \(h=30\) m and \(\beta=0.5^{\circ}\). As shown in the figure, the observations obtained underneath the sonar have higher sensing confidence with gradually increasing uncertainty in the transversal direction.  
For the j-th transect, we predict the potential coverage area \(A^{j}\) based on the candidate path and the minimum sonar swath \(min(S_{k})\). The candidate path consists of the candidate transect connecting two waypoints and the transition path from the current vehicle location to the first waypoint. For each unexplored cell, \(O(M_{x,y})\) =0, inside \(A^{j}\), we compute its cross-track distance, \(e_{x,y}\), to the j-th transect.  
Consequently, \(\alpha\) can be calculated by \(\alpha=atan(e_{x,y}/\bar{h})\), where \(\bar{h}\) is the mean vehicle altitude computed from gained sonar measurements. By substituting it into \(S(\alpha)\), we get the following equation.  
\[S(e_{x,y})=\frac{(tan(\beta))^{2}}{(tan(atan(e_{x,y}/\bar{h})+\beta)-tan(atan(e_ {x,y}/\bar{h})-\beta))/2\cdot tan(\beta)/cos(atan(e_{x,y}/\bar{h}))} \tag{8}\]  
By applying the above equation, we can get the confidence of each cell. Subsequently, we define the sensing reward for the j-th transect by the mean confidence \(S(e_{x,y})\) of the unexplored cells in \(A^{j}\):  
\[S^{j}=\bar{S}(e_{x,y})\quad|<x,y>\in A^{j}\&O(M_{x,y})=0 \tag{9}\]  
The sensor confidence will also be used as a metric to evaluate the quality of the obtained bathymetric map by inspecting the sensor confidence of each cell in the workspace. A cell may be observed during several transects and each observation will increase its confidence. Assuming \(S(x,y|k)\) is the sensor confidence for a specific cell in the \(k\)-th transect and it is observed \(n\) times. The overall sensor confidence \(S(x,y|1:k)\) of this cell is calculated by:  
\[S(x,y|1:k)=1-\prod_{k=1}^{n}(1-S(x,y|k)) \tag{10}\]