## 3 Onboard Train Localization Algorithm
### Data Fusion  
In the SINS update calculation, attitude updates were already performed. In the dead-reckoning (DR) navigation algorithm, there is no need to perform attitude updates separately. Instead, the attitude matrix from the inertial navigation can be directly used to transform OD measurements into the navigation frame, obtaining the DR navigation velocity in the navigation frame [28,29]. At this point, both the inertial navigation and dead-reckoning navigation use the same attitude matrix, which means they share the same misalignment angle errors. In this way, inertial navigation errors and dead-reckoning navigation errors are combined into the following state vector:  
We considered the misalignment errors \(\mathbf{\phi}^{n}\), velocity errors \(\delta\mathbf{v}_{I}^{n}\), position errors \(\delta\mathbf{p}\), gyro drift errors \(\mathbf{\varepsilon}^{b}\), accelerometer biases \(\
abla^{b}\), OD scale factor error, pitch installation angle error, yaw installation angle error \(\mathbf{\kappa}_{D}=\left[\delta\mathbf{\alpha}_{\theta}\quad\delta\mathbf{\alpha}_{\psi} \quad\delta K_{D}\right]^{\text{T}}\), and arm lever error \(\delta\mathbf{L}_{D}^{b}\). According to the SINS algorithm and the DR algorithm, the error states of the SINS/OD can be written as follows [30,31]:  
\[\mathbf{X}_{D}=\left[(\mathbf{\phi}^{n})^{\text{T}}\quad\left(\delta\mathbf{v}_{I}^{n} \right)^{\text{T}}\quad\left(\delta\mathbf{p}\right)^{\text{T}}\quad\left(\mathbf{ \varepsilon}^{b}\right)^{\text{T}}\quad\left(\
abla^{b}\right)^{\text{T}} \quad\left(\kappa_{D}\right)^{\text{T}}\quad\left(\delta\mathbf{L}_{D}^{b}\right) ^{\text{T}}\right]^{\text{T}} \tag{15}\]  
We defined \(\mathbf{F}_{D}\) as the state transfer matrix, \(\mathbf{G}_{D}\) as the system noise-driving matrix, and \(\mathbf{W}_{D}=\left[\mathbf{\varepsilon}_{w}^{b}\quad\
abla_{w}^{b}\right]^{\text{T}}\) as the system excitation noise matrix. Considering the OD correlation error state as a random constant, the 21-state SINS/DR-integrated system are modeled as  
\[\dot{\mathbf{X}}_{D}=\mathbf{F}_{D}\mathbf{X}_{D}+\mathbf{G}_{D}\mathbf{W}_{D} \tag{16}\]  
In which  
Figure 6: Estimated position projection to track’s center line. \[\mathbf{F}_{D}= \begin{bmatrix}\mathbf{F}_{15\times 15}&\mathbf{0}_{15\times 6}\\ \mathbf{0}_{6\times 15}&\mathbf{0}_{6\times 6}\end{bmatrix} ,\ \mathbf{G}_{D}= \begin{bmatrix}-\mathbf{C}_{b}^{n}&\mathbf{0}_{3 \times 3}\\ \mathbf{0}_{3\times 3}&\mathbf{C}_{b}^{n}\\ \mathbf{0}_{15\times 6}\end{bmatrix}  \tag{17}\]  
\[\mathbf{F}_{15\times 15}= \begin{bmatrix}-\mathbf{\omega}_{em}^{n}\times&\mathbf{F}_{12}&\mathbf{F} _{13}&-\mathbf{C}_{b}^{n}&\mathbf{0}_{3\times 3}\\ \mathbf{f}_{sf}\times&\mathbf{F}_{22}&\mathbf{F}_{23}&\mathbf{0}_{3\times 3}&\mathbf{C}_{b}^{n}\\ \mathbf{0}_{3\times 3}&\mathbf{F}_{32}&\mathbf{F}_{33}&\mathbf{0}_{3\times 3}&\mathbf{0}_{3\times 3} \end{bmatrix}  \tag{18}\]  
where, \(\left(\mathbf{f}_{sf}^{n}\times\right)\) denotes the antisymmetric matrix; \(\mathbf{\omega}_{em}^{n}=\mathbf{\omega}_{ie}^{n}+\mathbf{\omega}_{en}^{n}\) denotes the rotation of the \(n\) system with respect to the \(i\) system; \(\mathbf{\omega}_{ie}^{n}= \begin{bmatrix}\mathbf{0}&\omega_{ie}\cos L&\omega_{ie}\sin L \end{bmatrix} ^{\mathsf{T}}\) denotes the projection of the angular velocity of the Earth's rotation under the \(n\) system; \(\omega_{ie}\) denotes the angular velocity of the Earth's rotation; \(L\) denotes the latitude where the train is situated; \(\mathbf{\omega}_{en}^{n}= \begin{bmatrix}-v_{N}^{n}/\left(R_{M}+h\right)&v_{E}^{n} /\left(R_{N}+h\right)&v_{E}^{n}\tan L/\left(R_{N}+h\right)\end{bmatrix} ^{ \mathsf{T}}\) denotes the angular velocity of the rotation of the navigation system; \(\mathbf{v}^{n}= \begin{bmatrix}v_{E}^{n}&v_{N}^{n}&v_{U}^{n}\end{bmatrix}