## 2 Research on Lateral Distance Measurements for Tunnel Vehicle Localization  
The principle of a laser radar, also known as Light Detection and Ranging (LiDAR), is based on its emitting an infrared laser beam from the radar itself and receiving the reflected infrared beam from the surrounding environment. By measuring the time between the emission and reception of the laser pulses, the distance can be calculated. Taking the example of a VLP-16 LiDAR (Figure 1), this consists of 16 laser beams distributed within a 30\({}^{\circ}\) angle. The beams are evenly spaced at a 2\({}^{\circ}\) interval, with 15\({}^{\circ}\) covering the upward and downward directions. Using LiDAR to obtain lateral distance measurements of tunnel vehicles, the specific method is as follows:  
1. Classify LiDAR points into surface feature points and line feature points based on curvature, and remove the line feature points. Figure 1: LiDAR sensor. By applying the LiDAR-measured point cloud data of the tunnel, calculate the curvature of each point using the following formula:  
\[c=\frac{1}{|\mathcal{S}|\cdot\left\|X^{L}_{(k,i)}\right\|}\left\|\sum_{j\in \mathcal{S},j\
eq i}\left(X^{L}_{(k,j)}-X^{L}_{(k,i)}\right)\right\| \tag{1}\]  
In the equation, \(S\) represents the set of five continuous points obtained by the same laser beam; \(X^{L}_{(k,j)}\) and \(X^{L}_{(k,i)}\) represent the coordinates of the \(j\)-th and \(i\)-th points in the k-th frame in the LiDAR coordinate system. Typically, the points with the highest curvature are selected as line feature points, while those with the lowest curvature are considered surface feature points. Calculate the horizontal distance from the LiDAR to obstacles when LiDAR is horizontal and select the m smallest values. These values correspond to the point cloud data that form a set \(\{D\}\). Assuming the maximum elevation angle of the LiDAR is \(\theta\), select the point cloud data with an elevation angle of \(\theta\) obtained from step (1). Calculate the horizontal distance between the LiDAR and obstacles at different horizontal rotation angles when the elevation angle is \(\theta\), using the following formula:  
\[d^{\gamma}=l_{\theta}\cdot\cos\theta \tag{2}\]  
\[\left\{D\right\}_{m},\,d^{\gamma}_{D}=\text{min}d^{\gamma} \tag{3}\]  
In the equation, \(\gamma\) represents the horizontal rotation angle of the LiDAR, \(d^{\gamma}\) represents the horizontal distance between the LiDAR and obstacles at an elevation angle of \(\theta\) and a horizontal rotation angle of \(\gamma\), and \(l_{\theta}\) represents the slope distance between the LiDAR and obstacles at an elevation angle of \(\theta\) and a horizontal rotation angle of \(\gamma\). \(\{D\}\) represents the set of point cloud data from the m LiDARs with the smallest \(d^{\gamma}\), and m represents the length of \(\{D\}\). Refer to Figure 2 for illustration. Calculate the horizontal distance from the LiDAR to obstacles when it is tilted. Uneven road surfaces or the tilting of the LiDAR may cause it to be non-horizontal, as shown in Figure 3.  
Figure 2: Distance measurement when LiDAR is horizontal. Select the point cloud data obtained from the LiDAR with an elevation angle of \(\alpha(\alpha<\theta)\) from step (1). For each LiDAR point in \(\{D\}\) described in step (2), select the point cloud data with the same horizontal rotation angle and an elevation angle of \(\alpha\), then calculate the horizontal distance \(d^{l}\) between the LiDAR and obstacles at that horizontal rotation angle. The calculation formula is as follows:  
\[a=\sqrt{l_{\theta}^{2}+l_{\alpha}^{2}-2l_{\theta}l_{\alpha}\text{cos}(\theta- \alpha)} \tag{4}\]  
\[d^{l}=l_{\theta}\cdot\sqrt{1-\left(\frac{a^{2}+l_{\theta}^{2}-l_{\alpha}^{2}} {2 al_{\theta}}\right)^{2}} \tag{5}\]  
In the equation, \(\alpha\) represents the elevation angle of the LiDAR, where \(\alpha<\theta\).