## 3 Proposed Method
### Metric Localization for Vehicle Pose  
For the current localization node, \(L_{m}\), if the nearest map node \(M_{\text{nearest}}\) was retrieved, the next step was to solve the final pose of the intelligent vehicle based on the local feature matching results. The specific steps were as follows. First, the ORB local feature set \(\Omega_{\text{query}}\) was extracted from the around-view image of the current localization node, \(L_{m}\), and matched with the ORB local feature set, \(\Omega_{\text{train}}\), of the nearest map node \(M_{\text{nearest}}\)'s around-view image. Then, the random sample consensus (RANSAC) algorithm [53] was used to remove the mismatched feature pairs and retain the correct matching feature pairs, denoted as \(f_{\text{query}}\) and \(f_{\text{train}}\), where \(f_{\text{query}}\subset\Omega_{\text{query}}\) and \(f_{\text{train}}\subset\Omega_{\text{train}}\). Next, based on Formula (2), \(f_{\text{query}}\) was transformed to the vehicle coordinate system to obtain the feature set \(f_{\text{query}}^{\text{V}}\). Based on the global pose of the nearest map node, \(M_{\text{nearest}}\), and Formula (2), \(f_{\text{train}}\) was transformed to the global coordinate system to obtain the feature point set \(f_{\text{train}}^{\text{G}}\). Finally, based on the global predicted pose of the current localization node, \(L_{m}\), the Levenberg-Marquardt (L-M) algorithm [54] was applied to associate \(f_{\text{query}}^{\text{V}}\) with \(f_{\text{train}}^{\text{G}}\), to calculate the pose of the current localization node, \(L_{m}\), in the global coordinate system.  
It is essential to highlight that if the current localization node, \(L_{m}\), fell outside the map coverage area, the global pose of the intelligent vehicle was calculated based on the local feature matching results between \(L_{m}\) and the preceding localization node \(L_{m-1}\), employing a calculation method similar to that described earlier. Algorithm 1 effectively demonstrates the integration and execution process of the proposed intelligent underground localization method.  
```
1:\(KBD\): Key berths data for constructing the lightweight map
2:\(LD\): Localization data from AVM
3:Output:
4:\(PD\): Precise global pose data of the intelligent vehicle
5:function generateLightweightMap(\(KBD\)):
6:\(Map\leftarrow\) initializeEmptyMap()
7:for each DataNode in KBD:
8:\(f_{\text{holistic}}\leftarrow\) extractHolsticFeatures(DateNode.image)
9:\(f_{\text{local}}\leftarrow\) extractLocalFeatures(DateNode.image)
10:\(\boldsymbol{P}_{\text{map}}\leftarrow\) calculateGlobalPose(DateNode.cornerPoints)
11:\(MapNode\leftarrow\) createNode(DateNode.id,\(f_{\text{holistic}}\),\(f_{\text{local}}\), \(\boldsymbol{P}_{\text{map}}\))
12:\(Map\).addNode(MapNode)
13:endfor
14:return Map
15:function trajectoryPrediction(VehicleTrajectory):
16:if the VehicleTrajectory is a straight line:
17:\(\boldsymbol{P}_{\text{Predict}}\leftarrow\) linearExtrapolation(VehicleTrajectory)
18:elseif the VehicleTrajectory is a curve:
19:\(\boldsymbol{P}_{\text{Predict}}\leftarrow\) clothoidTheory(VehicleTrajectory)
20:endif
21:return\(\boldsymbol{P}_{\text{Predict}}\)
22:function multimodalLocalization(QueryImage, \(\boldsymbol{P}_{\text{Predict}}\), Map):
23:if the \(\boldsymbol{P}_{\text{Predict}}\) is within the map coverage range:
24:\(f_{\text{queryHolstic}}\leftarrow\) extractHolsticFeatures(QueryImage)
```  
**Algorithm 1** Intelligent underground localization algorithm