## 2 System Model  
### Inertial Navigation System Model  
For the foot-mounted inertial navigation system, the error-state Kalman filter was used to estimate the state error and the position change [36]. The misalignment angle and gyroscope deviation were chosen as the estimation states so that the error state could be taken as \(\delta\mathbf{x}=\left[\delta\mathbf{\theta}\quad\delta\mathbf{\omega}_{b}\right]^{T}\) and the state without error quantities was \(\mathbf{x}=\left[\mathbf{q}\quad\mathbf{\omega}_{b}\right]^{T}\), where \(\delta\mathbf{\theta}\) is the misalignment angle error, \(\delta\mathbf{\omega}_{b}\) is the angular rate gyro bias error, \(T\) is the transpose operation of a matrix, \(\mathbf{q}=\left[q_{0}\quad q_{1}\quad q_{2}\quad q_{3}\right]^{T}\) is a Hamiltonian quaternion, and \(\mathbf{\omega}_{b}\) is the angular rate gyro bias. We defined \(\mathbf{x}_{t}=\left[\mathbf{q}_{t}\quad\mathbf{\omega}_{bt}\right]^{T}=\mathbf{x}\oplus\mathbf{x}\) as the true state, where \(\mathbf{q}_{t}\) is the true quaternion and \(\mathbf{\omega}_{bt}\) is the true angular rate gyro bias, \(\oplus\) is a generic composition consisting of quaternion multiplication and vector addition. The corresponding specific expansion forms were \(\mathbf{q}_{t}=\mathbf{q}\{\delta\mathbf{\theta}\}\circ\mathbf{q}\) and \(\mathbf{\omega}_{bt}=\mathbf{\omega}_{b}+\delta\mathbf{\omega}_{b}\), where \(\circ\) is quaternion multiplication. On the basis of the error equations of inertial navigation, the discrete-time motion model was formulated as follows:  
\[\delta\mathbf{x}_{k}=\mathbf{F}_{k}\delta\mathbf{x}_{k-1}+\mathbf{W}_{k-1} \tag{1}\]  
where \(\delta\mathbf{x}_{k}\) and \(\delta\mathbf{x}_{k-1}\) are the error states at time \(k\) and \(k-1\) respectively, \(\mathbf{F}_{k}= \begin{bmatrix}\mathbf{I}_{3\times 3}&-\mathbf{C}_{b}^{n}T\\ \mathbf{O}_{3\times 3}&\mathbf{I}_{3\times 3}\end{bmatrix} \) is the state transition matrix at time \(k\), \(\mathbf{W}_{k-1}\) is the system noise with a zero mean Gaussian distribution, \(\mathbf{I}_{3\times 3}\) is an identity matrix, and \(\mathbf{O}_{3\times 3}\) is a zero matrix. \(\mathbf{C}_{b}^{n}\) is the direction cosine matrix from the body frame to the navigation frame, which can be denoted by the quaternion \(\mathbf{q}\) as [37]:  
\[\mathbf{C}_{b}^{n}= \begin{bmatrix}q_{0}^{2}+q_{1}^{2}-q_{2}^{2}-q_{3}^{2}&2(q_{1}q _{2}-q_{0}q_{3})&2(q_{1}q_{3}+q_{0}q_{2})\\ 2(q_{1}q_{2}+q_{0}q_{3})&q_{0}^{2}-q_{1}^{2}+q_{2}^{2}-q_{3}^{2}&2(q_{2}q_{3}- q_{0}q_{1})\\ 2(q_{1}q_{3}-q_{0}q_{2})&2(q_{2}q_{3}+q_{0}q_{1})&q_{0}^{2}-q_{1}^{2}-q_{2}^{2}+q _{3}^{2}\end{bmatrix}  \tag{2}\]In this system, two kinds of measurement were considered, including the accelerometer and magnetometer measurements at the moment of zero velocity. For the acceleration measurements, the following equation was available:  
\[\mathbf{a}_{b}=\mathbf{C}_{n}^{b}\mathbf{g}_{n} \tag{3}\]  
where \(\mathbf{a}_{b}\) and \(\mathbf{g}_{n}\) are the gravity vector under the body and navigation frame, respectively. \(\mathbf{C}_{n}^{b}\) is the direction cosine matrix from the navigation frame to the body frame, and the relationship between \(\mathbf{C}_{n}^{b}\) and \(\mathbf{C}_{b}^{n}\) is \(\mathbf{C}_{n}^{b}=\left(\mathbf{C}_{b}^{n}\right)^{T}\). For the magnetometer measurements, the following equation was available:  
\[\mathbf{m}_{n}=\mathbf{C}_{b}^{n}\mathbf{m}_{b} \tag{4}\]  
where \(\mathbf{m}_{b}\) and \(\mathbf{m}_{n}\) are the geomagnetic field vector under the body and navigation frames, respectively. Additionally, \(\mathbf{m}_{n}\) can be converted to the following form because there is no easterly component to the geomagnetic field, and the geographic frame (east-north-up) was chosen as the navigation frame.