## 4 Simulation Result
### Improved A* Algorithm Local Path Planning  
The global streamline method is a path planning method that uses fluid mechanic principles to generate a smooth path by calculating streamlines. However, this method is slow to respond when encountering obstacles and usually only turns when close to the obstacle, making the USV prone to path failure or at risk of collision when navigating in complex sea areas. In order to solve this problem, this study proposes a strategy to segment and plan complex sea areas. The operation process is shown in Figure 17. Specifically, global planning uses the streamline method to determine the overall path direction. When it is detected that the path passes through a complex obstacle area, it enters the local segmentation and planning stage. The improved A* algorithm is used for precise path planning for local planning. By setting a safe distance and making appropriate adjustments and optimizations at crucial turning points or nodes, the generated path can avoid obstacles while maintaining a relatively smooth path. This method significantly improves the effectiveness and safety of path planning by predicting and avoiding obstacles in advance. The path planning for local complex sea areas is shown in Figure 18. As can be seen from the figure, the search path without setting a safety distance will be close to the obstacle, while the search path with a safety distance will be far away from the obstacle. When the safety distance is not set, the path of the USV will be very close to the obstacle, and there is an excellent risk of collision. Although this path that closely follows the obstacle may sometimes shorten the distance, it also increases the uncertainty and danger during navigation, especially when the sea conditions are complex or the obstacle is in motion. It is more likely to cause path failure or collision accidents. On the contrary, the path planning method with a safety distance setting shows significant improvements, ensuring that a specified safety distance is maintained around the obstacle. This dramatically reduces the risk of collision and provides the USV with more ample navigation space, making it easier to adjust and avoid obstacles when encountering emergencies. Figure 16: Global optimal route. Figure 17: Local segmentation path planning. In this paper, to ensure the safety and efficiency of the USV during navigation, we conduct a comprehensive analysis and set the safety distance to 10 grid units. The paths planned by the traditional A* algorithm are close to the obstacles as shown in Figure 19a, while the RRT algorithm shown in Figure 19b has many turning points. In this paper, we improve the A* algorithm by introducing a safe distance to avoid obstacles and smoothing the critical turning points with Bessel curves, as shown in Figure 19c. These improvements not only ensure that the path is far away from obstacles but it is also more consistent with the kinematics of the USV. These improvements significantly increase the safety and efficiency of the path planning, the feasibility of the path, and the smoothness of the navigation. The comparison between the time and the path length of several of these algorithms is shown in detail in Table 2.  
Figure 20 shows the effect of adding warnings for dangerous sea areas in the GeoNetworking mode, and this paper sets the safety distance to 5 grid units. Through the broadcast mechanism and warning information of the GeoNetworking network mode, the USV can obtain information and avoid unknown dangerous areas more quickly. This system not only improves the safety of USVs but also ensures that they can complete tasks efficiently and avoid mission interruptions or failures caused by collisions or other accidents, thus providing a solid guarantee for the safe and efficient navigation of USVs in complex sea environments.