## 4 Discussions  
The spline function interpolation method with obstacles is performed to get the raster depth area with the water depth point selected as input point feature and the smoothing coefficient chosen as 0 and the grid size set as 25 m. The feasible space is updated according to the calculated minimum depth of safe navigation (1.29 m). Related parameters are shown in Table 6. The simulation is also based on the following assumptions: Assuming the unmanned vehicle as a mass point, unmanned vehicles can safely cross the junction vertex of the blocked grid and free gird between the obstacle area and the non-obstacle area, and unmanned vehicles can complete the turnaround operation in the grid. The proposed approach is simulated using Matlab R2018b. All simulations are performed on a PC with Microsoft Windows 10 as OS with Intel i5 2.712 GHz quad core CPU and 8 GB RAM. Figure 11: WDRLA* algorithm pseudo code chart. The positions of USV are represented by the grid index value of row and column where the point is located. S(500, 500) is chosen as the starting node and G(650, 650) as the goal node. Three kinds of cost function, including only distance, cost seeing Equation (15), only risk level cost seeing Equation (13), cost of combining seeing equation (16), were used to calculate the paths of shortest distance path (SDP), the shorter and safer path (SSP), the safest path (SFP) The results are shown in Figure 12. Compared with Figure 12a-c, it can be seen that the path planning algorithm considering water depth risk level will lead to more expanded nodes, so the search speed will be slower than A* and the expanded nodes of WDRLA* is less than those of SFP seeing Figure 12b,c. Figure 12d,e indicate that there is little difference between SSP and SFP, which means approximate depth risk level, but SDP is closer to the obstacle, so the risk level is much higher. Water depth risk level A* algorithm (WDRLA*) can reduce the depth risk and improve the safety of path, but sacrificing a certain calculation time. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Value** \\ \hline Cell size & 25 m \(\times\) 25 m \\ L & 3.2 m \\ \(\overline{T}\) & 0.5 m \\ \(z_{\text{max}}\) & 0.3 m \\ \(\theta_{\text{max}}\) & 11\({}^{\circ}\) \\ \(e_{enc}\) & 0.2 m \\ \(\alpha\) & 10 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Table of Related parameters. Figure 12: Comparison of three kinds path. (**a**) Shortest distance path (SDP) that ignores the depth risk; (**b**) Shorter and safer path (SSP) that considers the depth risk level and distance. (**c**) Safest path (SFP) that considers only the depth risk. The colorful grids in figure (**a–c**) are extended nodes. The space of white grids represents the feasible space, and the black grids are obstacles. (**d**) Three paths, shown on the depth distribution map. (**e**) Three paths, shown on the depth risk level distribution map. (**f**) Three paths, shown on S57 ENC. The black line is the SDP, the blue one is SSP, and the purple one is SFP. Take S(710, 902) as the starting node, and G(990, 1408) as the goal node, Results of three kinds of paths are shown in Figure 13. From Figure 13, it can be drawn that there are marked differences between SDP and SSP in shallow coastal waters. SDP passes through a narrow channel with shallow water depth which is more dangerous, while SSP and SFP avoid narrow channel by choosing deeper water area, where SSP reduces the risk of the path by 39.61% (see Table 7). At the same time, the number of extended nodes increases greatly, so WDLRA* path search process is slower than A*. SSP increases 1652m and 10.54% in length compared with SDP. The length of SSP and SFP is approximate, but SSP with less expanded nodes.