# Improving Smartphone GNSS Positioning Accuracy Using Inequality Constraints
## 3 Kalman Filter with Inequality Constraints
### Solution of Inequality Constraint
The formula for computing the RMSE value is:

\[\text{RMSE}=\sqrt{\frac{\sum_{i=0}^{n}\left(x_{i}-\hat{x}\right)^{2}}{n}} \tag{29}\]

where \(i\) represents the epoch index, \(n\) represents the number of epochs, \(x_{i}\) represents the calculation result series, and \(\hat{x}\) represents the actual value. In this paper, we calculated the actual value of position and velocity using the commercial software CGO using the GNSS measurements from the geodetic receivers. When the result series had a lower RMSE, it meant that it had higher positioning accuracy. To compare the positioning accuracy of different methods, we calculated the improvement percentage as follows:

\[Imp=\frac{\text{RMSE}_{ori}-\text{RMSE}_{constrained}}{\text{RMSE}_{ori}} \times 100\% \tag{30}\]

where \(Imp\) represents the improvement percentage, \(\text{RMSE}_{ori}\) represents the RMSE result without using the constraint, and \(\text{RMSE}_{constrained}\) represents the RMSE result after using the constraint. ## 5 Results Analysis

### Performance of Vertical Velocity Constraint

At this stage, the vertical velocity was set to the prior information for constraining. To verify the effectiveness of vertical velocity in the application, we first calculated the vertical velocity of the dynamic dataset and analyzed it. It should be noted that the speed of the static datasets was zero over this period. Therefore, the velocity constraint was absolutely valid. Shown in Figure 8 is the calculated vertical velocity using observations from the reference geodetic receiver. It can be seen that the vertical velocity range is \(-0.3\) m/s \(\sim\) 0.3 m/s. Therefore, we set the velocity constraint at [\(-0.3\) m/, \(0.3\) m/s] both for static and dynamic datasets in this experiment. We only analyzed the results of HP30 for convenience of expression. It should be noted that the results of the other two smartphones are similar. Firstly, the velocity estimation errors were determined; these are shown in Figure 9, in which the blue points represent the original results and the orange points represent the estimated velocity under constraints. It can be found that there is a slight difference in the E/N components between the two methods, but the difference in the U component is obvious. Specifically, the vertical velocity estimated without constraint is distributed between \(-0.5\) m/s and \(0.5\) m/s, and the RMSE is \(0.16\) m/s. With constraint, the range of vertical velocity shrinks to \(-0.2\) m/s\(-0.2\) m/s, and the RMSE is \(0.07\) m/s. This indicates that the influence of the vertical velocity con

Figure 8: Vertical velocity of the dynamic car-borne dataset. The plot shows that vertical velocity is in the range of [\(-0.3\) m/s\(\sim\)0.3 m/s]. straint is mainly on the vertical direction, and there is a great improvement in vertical velocity estimation. Regarding the improved velocity estimation, the positioning result can be changed indirectly, and this is shown in Figure 9. Similarly, the horizontal improvement is slight, and there is notable positioning enhancement in the up component. Compared with the velocity estimation, the position cannot be constrained to a specific range. However, it can be seen in the figure that the orange points are much smoother than the blue points. The vertical RMSE accounts for 9.41 m of the original result and 6.38 m of the constrained result. The improvement percentage is 32.22%. Overall, applying a vertical velocity constraint could enhance velocity and position estimation, but the horizontal improvement is not obvious. Shown in Figure 10 are the velocity and position results of the HP30 dynamic dataset. In this case, the smartphone was moved between different environments, and the velocity estimation performance is worse than that of the static dataset. Therefore, the estimated vertical velocity is between approximately \(-2\) m/s and \(2\) m/s, and the position error in the up component is large. After constraining, it is clear that velocity and position estimation performance is improved.