# Fast Path Planning for Autonomous Ships in Restricted Waters
## 4 Discussion
It can avoid concave static obstacles in advance and reach the goal with obstacles nearby, other than being trapped in U-shaped obstacles (see Figures 11 and 12). It should be noted that the decision-making time should be adjusted suitably; although a larger value can make early CA actions possible, it may skip some small obstacles. Second, a three-degree-of-freedom Mariner class vessel is incorporated in this method, providing more realistic trajectories that are closely followed by the autopilot. The desired heading of each time step, which is calculated by the main part of the algorithm, is taken as the input of the PD controller. The output of the PD controller, including the ship's real-time position, speed, yaw rate and rudder angle, is treated as the input of the path planning for the next time step. After many iteration cycles, a practical and smooth path is produced. Third, the marine environment is complex and changeable, including the influence of winds and current and the steering instability of a ship. It is difficult to strictly maintain course and speed for any TS. Additionally, the TS may be approaching the next waypoint, avoiding static obstacles or making way for other TSs. Of course, most ships take CA actions in accordance with COLREGS, but COLREGS do not quantify the timing and magnitude of the CA actions regarding course and/or speed change,etc. Different operators have different understandings of COLREGS because of different navigation experiences. Therefore, it is not easy to accurately predict the possible COLREGS-compliant actions (including their magnitude), especially in multiship encounters. There is even a risk that some TSs will not obey COLREGS and seafarers' usual practice. Therefore, our method has as its priority compliance with rules 13-17 of COLREGS for power-driven vessels (see Table 9 and Figure 17). In addition, the proposed method reacts immediately to sudden changes such as the uncoordinated CA behaviors of TSs and is capable of improving the quality of output plans by automatically judging and handling the surrounding obstacles (see Figures 13 and 16). Fourth, we introduce a modified WPT selection method, i.e., the angular bisector method based on the prior path planning algorithm. By doing this, the method of COA is improved to avoid extra detour or collision risk when some obstacles are in the vicinity of the waypoint. Figure 19a shows a collision example with TS3 when \(r_{k}\) = 0.25 nm without adopting the angular bisector method. A larger \(r_{k}\) may solve the collision problem, but it will lead to a larger detour from the prior path (see Figure 19b), where \(r_{k}\) = 0.5 nm without using the angular bisector method. Our method can make the own ship navigate along a long optimal path with multiple waypoints and adjust them automatically by reacting to dynamic environments. As shown in Figure 19c, the own ship would cause danger to dynamic TS3 if she continues approaching WPT1. After crossing the angular bisector of the angle between the adjacent path legs, the next waypoint WPT2 rather than WPT1 is automatically selected as the subgoal, although the own ship position is not in the COA of WPT1. This simulation demonstrates the flexibility and optimization ability of the proposed method in path planning. Therefore, the test assumptions and environments in this paper can match the real navigation environments of autonomous ships to a certain extent. In addition, the PGHAPF method has the following advantages. This method requires very low computational time. The total run time can be 0.8 s for a simulation with dynamic and complex environments, whose planning distance is 19.38 nm with a total of 315 time steps. Thus, the decision-making time for one time step is only approximately 2.6 milliseconds (ms). The running times of other experiments are shown in Table 10. The computational time of the PGHAPF method is not obviously affected by the number of obstacles or planning distance, but it may be influenced by the complexity of construction for the obstacle APF.