## 2 Methods
### Measurement Model for Odometer Observation with Vehicular-Motion Constraint
\(\theta\) is derived from the velocity state transformed into the l-frame and is thus vulnerable to the quality of GNSS measurement and significant vehicular motion. To secure the performance of the lateral constraint, the moving average filter (MAF) and the detection of heading condition are designed before (19)-(21) update EKF, which is formulated as,  
\[\theta=\overline{\theta}_{i-1}+\frac{\theta_{i}-\theta_{i-1}}{\gamma},\ \left| \theta_{i}-\overline{\theta}_{i-1}\right|\leq d\theta_{three}\ \&\ \beta>\gamma \tag{22}\]  
with  
\[\overline{\theta}= \begin{cases}\frac{1}{n}\sum\limits_{i=1}^{\beta}\theta_{i },&\beta=\gamma\\ \sum\limits_{i=1}^{\beta}\theta_{i},&\beta<\gamma\end{cases} \]  
where \(\overline{\theta}_{i-1}\), \(\theta_{i}\), \(d\theta_{three}\), \(\gamma\), and \(\beta\) denote the averaged heading angle at \(i-1\) epoch, heading angle derived from the estimated velocity at the current epoch, threshold of heading change between the current heading and the previously averaged angle, window size, and the number of \(\theta_{i}\) used in MAF. The implementation of the proposed lateral velocity constraint in (19)-(22) further enhances the directivity of smoothing between adjacent epochs, because a priori information is used. In this design, when the heading change is less than \(d\theta_{\mathit{three}}\), and \(\beta\) exceeds \(\gamma\), the lateral constraint will use the averaged heading based on the outcome of (22); otherwise, the lateral constraint will be closed until the counts of qualified \(\theta_{i}\) reach \(\gamma\). The intervention of \(d\theta_{\mathit{three}}\) is used to assure that the designed constraint will not be activated during significant vehicular motion, such as a turning maneuver. Notably, the calculation of angular distance in (22) must consider the vibration of angular conversion from the estimated velocity between adjacent epochs, such as the case of \(\left|\theta_{i}-\overline{\theta}_{i-1}\right|>180^{\circ}\) or \(<-180^{\circ}\), averting a false output/determination in (22). The advantage of the odometer-based methods mentioned above is that they provide additional measurements (constraints) and improve the state estimation result under the contamination of multipath/NLOS reception. However, if a limited number of tracked satellites with bad geometry exists and false GNSS measurements update EKF, unsatisfactory estimation could still emerge. Using the similar concept of (19)-(22), odometer-based FDE can be implemented. The velocity, based on an odometer, is a forward speed in the v-frame, as given in (15), following the forward direction of the vehicle. If the result of the position state estimation from GNSS presents an abnormal motion in the lateral, the estimation result is dominated by unhealthy signals. Such an FDE method can be formulated as follows:  
\[\Delta d_{lateral}= \tag{23}\] \[A(t_{k-1})\times(r^{\prime}_{u,\ x}(t_{k})-r^{\prime}_{u,x}(t_{k-1 }))+B(t_{k-1})\times(r^{\prime}_{u,\ y}(t_{k})-r^{\prime}_{u,\ y}(t_{k-1}))+C( t_{k-1})\times(r^{\prime}_{u,z}(t_{k})-r^{\prime}_{u,z}(t_{k-1})),\] \[\delta\mathbf{k} \begin{cases}feedback,&\Delta d_{lateral}\leq \mathbf{s}\times v(t_{k-1})\\ feedback rejected,&\Delta d_{lateral}>\mathbf{s}\times v(t_{k-1})\end{cases} \]  
where \(\Delta d_{lateral},s\), and \(v_{k-1}\) indicate the displacement between adjacent epochs in the lateral direction of the vehicle, scale coefficient, and instantaneous velocity from an odometer at the last GNSS epoch, respectively. As shown in Figure 2, the concept of (23) is based on the fact that, theoretically, for a land vehicle, the displacement in the lateral direction between consecutive GNSS epochs will not surpass the resultant speed in the forward. While, \(s\) is a variable coefficient depending on different vehicular conditions, such as low or high dynamics, coping with various scenarios in urban environments.