## 2 Materials and Methods
### Navigation Decision Module Design  
#### 2.3.1 Tractor Position Offset Correction  
As shown in Figure 6a, vehicle-mounted GNSS dual antennas are generally installed on the roof of the tractor cab and measure its position with respect to the WGS-84 frame. To facilitate the implementation of vehicle control, the reference point of the tractor for control is the ground projection of the center of the tractor's rear wheel axle. Once the antennas are installed, they are regarded as being fixedly connected to the vehicle body. When the carrier attitude changes, their positioning is prone to deviation. To correct their positioning offset in real-time, it is necessary to convert the spatial position in the antenna coordinate system to the position of the tractor reference point. The following three spatial coordinate systems are included in the above description:  
1. The origin of the navigation coordinate system (\(n\)-frame) is fixed to the reference point of the tractor, which changes with its motion. The X-Y plane of the \(n\)-frame is locally horizontal, and the Z-axis is perpendicular to the X-Y plane. In this paper, the X, Y, and Z axes are defined as the directions of north, east, and down, respectively. In this  
\begin{table}
\begin{tabular}{c c c c} \hline
**Control Loop** & **Kp** & **Ki** & **Kd** \\ \hline Speed-Loop PID & 0.8 & 0.05 & 0.01 \\ Angle-Loop PID & 1.2 & 0.01 & 0.1 \\ \hline \end{tabular}
\end{table}
Table 4: PID parameters of the steering control module.  
Figure 5: Results of steering angle tracking. (**a**) Sine signal tracking; (**b**) signal tracking error.  
work, the \(n\)-frame is employed to define the rotation transformation from the \(n\)-frame to the \(b\)-frame;
2. The origin of the body coordinate system (\(b\)-frame) is fixed at the center of the tractor's rear wheel axle, and the X, Y, Z axes point in the directions of front, right, and down, respectively;
3. The origin of the vehicle motion frame (\(m\)-frame) is defined as the ground projection of the center of the tractor's rear wheel axle. The X-axis points forward, the Y-axis points to the right side of the vehicle, and the Z-axis points down. The constant displacement between the \(m\)-frame and the \(b\)-frame is defined as the lever arm. The origin of the \(m\)-frame is calculated as follows: \[P_{m}=C_{b}^{n}\times P_{L}+P_{ant}\] (3) with \[C_{b}^{n}=\begin{bmatrix}\cos\theta\cos\psi&-\cos\phi\sin\psi+\sin\phi\sin \theta\cos\psi&\sin\phi\sin\psi+\cos\phi\sin\theta\cos\psi\\ \cos\theta\sin\psi&\cos\phi\sin\psi+\sin\phi\sin\theta\sin\psi&\sin\phi\cos \psi+\cos\phi\sin\theta\sin\psi\\ -\sin\theta&\sin\phi\cos\theta&\cos\phi\cos\theta\end{bmatrix}\] (4) where \(C_{b}^{n}\) is the rotation matrix transformation from the \(b\)-frame to the \(n\)-frame; \(\theta\) is the pitch angle of the vehicle body; \(\phi\) is the roll angle of the vehicle body; and \(\psi\) is the heading angle of the vehicle body. \(P_{L}\big{(}l_{x},l_{y},l_{z}\big{)}\) is the coordinate of the antenna phase center location with respect to the \(m\)-frame, and \(P_{ant}\big{(}X_{g},Y_{g},Z_{g}\big{)}\) is the position of the antenna in the Gauss plane coordinate system (\(g\)-frame). As shown in Figure 6b, changes in the pitch angle will introduce position offset in the forward direction, which has little effect on the lateral tracking accuracy, so pitch-derived position offset was neglected in this work. Only the \(\psi\) and \(\phi\) are directly measured by the dual-antenna RTK, and \(\theta\) is set as zero in the update of \(C_{b}^{n}\). However, when the vehicle's roll angle changes, its lateral deviation will change directly. The antenna height of the Dongfanghong 1104 was 2.3 m. When the roll angle was 3\({}^{\circ}\), the resulting lateral deviation \(dis\) was 0.12 m, which is unacceptable and must be addressed in ANS design.