# Differences Evaluation of Pavement Roughness Distribution Based on Light Detection and Ranging Data
## 2 Data Acquisition and Processing
### Data Processing
#### 2.2.2 Coordinate Transformation and Point Cloud Registration  
The point cloud data obtained from LiDAR scanning represents the object positions in the device's coordinate system. In order to obtain a continuous point cloud space, the collected point cloud data for each frame should therefore be spliced. This process requires a coordinate transformation to convert the data from the device's coordinate system to the vehicle coordinate system, followed by a second transformation to the geodetic coordinate system. Typically, the relationship between the LiDAR and vehicle coordinate systems can be characterized as a translation and rotation, as shown in Figure 3. The transformation of the point cloud coordinates before and after the conversion can be performed using Formula (2). The second transformation is similar to the first transformation, which is between the vehicle and geodetic coordinate systems.  
\[\left\{\begin{array}{l}\sin\theta=\frac{\sqrt{\tan^{2}\alpha+\tan^{2}\beta} }{\sqrt{\tan^{2}\alpha+\tan^{2}\beta+1}}\\ \cos\theta=\frac{\sqrt{\tan^{2}\alpha+\tan^{2}\beta+1}}{\sqrt{\tan^{2}\alpha+ \tan^{2}\beta}}\\ \left(n_{x},n_{y},n_{z}\right)=\left(\frac{\tan\beta}{\sqrt{\tan^{2}\alpha+ \tan^{2}\beta}},\frac{-\tan\alpha}{\sqrt{\tan^{2}\alpha+\tan^{2}\beta}},0 \right)\\ T=\left[\begin{array}{cc}n_{x}^{2}(1-\cos\theta)+\cos\theta&n_{x}n_{y}(1- \cos\theta)-n_{z}\sin\theta&n_{x}n_{z}(1-\cos\theta)+n_{y}\sin\theta\\ n_{x}n_{y}(1-\cos\theta)+n_{z}\sin\theta&n_{y}^{2}(1-\cos\theta)+\cos\theta&n_ {y}n_{z}(1-\cos\theta)-n_{x}\sin\theta\\ n_{x}n_{z}(1-\cos\theta)-n_{y}\sin\theta&n_{y}n_{z}(1-\cos\theta)+n_{x}\sin \theta&n_{z}^{2}(1-\cos\theta)+\cos\theta\\ \left(x_{0},y_{0},z_{0}\right)^{T}=T\cdot\left(x_{1},y_{1},z_{1}\right)^{T} \end{array}\right.\\ \text{where }\left(x_{1},y_{1},z_{1}\right)^{T}\text{ indicates the position of point cloud data in the LiDAR coordinate system, }(x_{0},y_{0},z_{0})^{T}\text{ indicates the coordinates converted to the vehicle coordinate system, and }\alpha\) and \(\beta\) represent the rotation angles of the LiDAR coordinate system around the Y-axis and the X-axis of the vehicle coordinate system, respectively. The angle direction is positively clockwise and \(T\) is the coordinate rotation matrix, as depicted in Figure 3c. The \(\alpha\) and \(\beta\) angles need to be measured or obtained from the manual of the LiDAR device.  
Figure 2: LiDAR angle deflection. (**a**) Angle deflection diagram. (**b**) Roll angle. (**c**) Roll angle correction. (**d**) Pitch angle. (**e**) Yaw angle.  
The process of point cloud registration involves several steps. Initially, the point cloud data was transformed from the LiDAR coordinate system to the vehicle coordinate system. Subsequently, using the GPS positioning data as the center of the vehicle coordinate system, the rotation parameters, including the yaw angle, roll angle, and pitch angle of the IMU system were applied to adjust the position and direction of the point cloud data for each frame. Ultimately, the registered point clouds were integrated into a single file. The root-mean-square error (RMSE) of the registration results was less than 0.04 m, which was deemed to be acceptable. It should be noted that the GPS positioning time, the IMU system's recording time, and the point cloud data collection time must be matched, as the data collected at different times cannot be utilized to rectify the point cloud coordinates.