## 2 Methods
### Determine the Set of Ships within Effective Rescue Distance in the Current Sea Area
#### 2.2.2 Determination of Grid Coding Level Based on Effective Rescue Distance  
Different coding levels of the Google S2 algorithm correspond to different actual geospatial range sizes, as shown in Table 3. Depending on the effective rescue distances, the search for rescue vessels in the sea area requires a given grid coding level, and the larger the coding level, the smaller the search range. Table 3 shows the area side length corresponding to different coding levels of Google S2. Different distances correspond to different coding levels. The effective rescue distance and the corresponding Google S2 coding level are derived. The results are shown in Table 4 [36].  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Speed (Nautical Miles/h)**} & \multicolumn{5}{c}{**Rescue Time/h**} \\ \cline{2-7}  & **0.5** & **1** & **1.5** & **2** & **3** & **12** \\ \hline
8 (Fishing boat and Transport ship) & 7.4080 & 14.8160 & 22.2240 & 29.6320 & 44.4480 & 177.7920 \\
9 (Fishing boat and Transport ship) & 8.3340 & 16.6680 & 25.0020 & 33.3360 & 50.0040 & 200.0160 \\
10 (Fishing boat and Transport ship) & 9.2600 & 18.5200 & 27.7800 & 37.0400 & 55.5600 & 222.2400 \\
15 (Professional rescue ship) & 13.8900 & 27.7800 & 41.6700 & 55.5600 & 83.3400 & 333.3600 \\
20 (Professional rescue ship) & 18.5200 & 37.0400 & 55.5600 & 74.0800 & 111.1260 & 444.4800 \\
25 (Professional rescue ship) & 23.1500 & 46.3000 & 69.4500 & 92.6000 & 138.9000 & 555.6000 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Effective rescue time and distance of different types of ships (km).  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Level** & **Random Cell Min Edge Length** & **Random Cell Max Edge Length** \\ \hline
00 & 7842 km & 7842 km \\
01 & 3921 km & 5004 km \\
02 & 1825 km & 2489 km \\
03 & 840 km & 1167 km \\
04 & 432 km & 609 km \\
05 & 210 km & 298 km \\
06 & 108 km & 151 km \\
07 & 54 km & 76 km \\
08 & 27 km & 38 km \\
09 & 14 km & 19 km \\
10 & 7 km & 9 km \\2.3 Search the Set of Ships Available for Rescue in the Neighborhood of the Ship in Distress According to the Effective Rescue Time  
Based on determining the rescue time, effective rescue distance, and Google S2 grid code level, it will search for eligible ships for rescue in the database based on the grid code.  
When the land rescue center receives the position information reported by the ship in distress, it must: (1) convert the position information reported by the ship in distress into a grid code of the corresponding Google S2 coding level; (2) determine the rescue time, effective rescue distance, and corresponding Google S2 coding level; and (3) retrieve the set of ships available for rescue in the database based on the grid code, i.e., the set of ships that can provide rescue in the current sea area in the effective rescue time, as shown in Algorithm 2.  
```
Input:_Lon, Lat, Time Output:SOA // Step 1: Determine the effective rescue distance according to the effective rescue time ShipType, Time\(\rightarrow\)Distance // Step 2: Determining Google S2 encoding level based on effective rescue distance Distance\(\rightarrow\)Precision // Step 3: Using Google S2 algorithm to convert the longitude and latitude information of the ship to be rescued into grid coding (_lon, lat, precision_)\(\rightarrow\)gridcode // Step 4: Using grid coding to obtain the set of ships available for rescue gridcode\(\rightarrow\)SOA return SOA
```  
**Algorithm 2** Searching for vessels available for rescue within the determined effective rescue time and effective rescue distance in a certain sea area