## 3 Methods
### Simulation Environment  
A simulation environment covering the extensive port area of 3600 m \(\times\) 4025 m was used to test the proposed method regarding the computation time, path length, and path safety compared to the basic version of the A* algorithm. As a reference map, a satellite map of the Northern Port in Gdansk was used as an RGB image obtained based on the Mapping Toolbox in the MATLAB environment [36]. Based on the actual distance measured from the geographic coordinates of the satellite image vertices, the map was resized to show a 1 m \(\times\) 1 m natural area as one pixel. The geodetic vertical and horizontal distance between satellite image vertices was calculated taking into account the WGS84 Earth ellipsoid model. Figure 1 shows the same pier measured in a satellite image and in the base image for the occupancy grid. It can be observed that the length of the pier calculated using Google tools (expressed in meters) is almost the same as that calculated based on Euclidean distance (expressed in pixels). \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Source**} & \multirow{2}{*}{**Method**} & \multirow{2}{*}{**Brief Description**} & \multirow{2}{*}{**Map Size**} & \multirow{2}{*}{**Path Length**} & \multirow{2}{*}{**Max. Calculation**} \\  & & & **[pixels]** & & **A*–The Worst Cases)** & & **Time Ratio (Basic A*/Proposed)—** \\ \hline \multirow{8}{*}{[35]} & \multirow{8}{*}{Improved A* algorithm} & The improved algorithm includes dynamic weighting in the evaluation function to adapt the search priorities based on the node’s location and directional screening of the search neighbourhood using azimuth angles to enhance efficiency. Additionally, the algorithm incorporates a safety radius to avoid obstacles. It employs Bezier curves to smooth the path, resulting in fewer inflexion points and a safer path. & \multirow{8}{*}{70 \(\times\) 60} & \multirow{8}{*}{87.7\%} & \multirow{8}{*}{1.2} \\  & & & & & \\ \cline{1-1}  & & & & & \\ \cline{1-1}  & & & & & \\ \cline{1-1}  & & & & & \\ \hline \multirow{8}{*}{[25]} & \multirow{8}{*}{APF-A* uses dynamic weight adjustments in the cost function to minimise unnecessary turns by penalising sharp turning angles. It integrates the artificial potential field method to incorporate obstacle 20 \(\times\) 20 & \multirow{8}{*}{100\%} & \multirow{8}{*}{1.2} \\  & & & & & \\ \cline{1-1}  & & & & & \\ \cline{1-1}  & & & & & \\ \cline{1-1}  & & & & & \\ \cline{1-1}  & & & & & \\ \hline \multirow{8}{*}{[25]} & \multirow{8}{*}{APF-A*} & \multirow{8}{*}{
\begin{tabular}{} \end{tabular} } & The algorithm uses resizing and morphological image processing to reduce the computation time of the A* algorithm by map optimisation. & \multirow{8}{*}{3600 \(\times\) 4025} & \multirow{8}{*}{102.8\%} & \multirow{8}{*}{719} \\ \cline{1-1}  & & & & & \\ \cline{1-1} \cline{2-5}  & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Cont. The image was converted from the RGB system to grayscale (Figure 2) by the following weight relationship [36]:  
\[\text{G}=0.2989\ \times\ \text{R}+0.5870\ \times\ \text{G}+0.1140\ \times\ \text{B} \tag{1}\]  
where R, G, and B are red, green, and blue colour components, respectively, expressed in the range of 0-255. In the next step of creating the environment for the basic A*, a grayscale image was converted to a binary map representing the occupied and free space based on threshold  
Figure 1: An example of the measurement of the same pier: (**a**) in a satellite image obtained from Google Maps [37]; (**b**) input image for occupancy grid with a resolution selected in such a way that 1 pixel corresponds to an area of 1 m\({}^{2}\) (distance in pixels). segmentation. For the proposed modification of the A* algorithm with map processing, the threshold segmentation operation was preceded by a sequence of image processing techniques that will be described in the next subsection. In both approaches, the segmentation threshold was set at 75/255 to obtain an occupancy grid.