# Improving Smartphone GNSS Positioning Accuracy Using Inequality Constraints
## 3 Kalman Filter with Inequality Constraints
### Solution of Inequality Constraint
Figure 9: Velocity and position errors of static dataset (HP30). (**a**) Velocity error; (**b**) position error. The RMSE results of the two approaches are displayed in Table 2 for all the smartphones, in both the static and dynamic datasets. It can be seen in the table that the vertical position can be improved. \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline  & **Device** & \multicolumn{3}{c}{**Original RMSE (m)**} & \multicolumn{3}{c}{**Constrained RMSE (m)**} & \multicolumn{3}{c}{**Imp**} \\ \cline{3-11}  & & **E** & **N** & **U** & **E** & **N** & **U** & **E** & **N** & **U** \\ \hline \multirow{3}{*}{Static} & HP40 & 2.56 & 5.05 & 10.07 & 2.49 & 4.93 & 7.94 & 3.00\% & 2.32\% & 21.09\% \\  & HP30 & 4.08 & 5.27 & 9.41 & 3.79 & 4.87 & 6.38 & 7.15\% & 7.65\% & 32.22\% \\  & XMI8 & 3.29 & 3.60 & 15.31 & 3.18 & 3.70 & 13.66 & 3.21\% & \(-\)2.74\% & 10.80\% \\ \hline \multirow{3}{*}{Dynamic} & HP40 & 1.77 & 3.15 & 5.04 & 1.81 & 2.77 & 3.93 & \(-\)2.58\% & 12.12\% & 21.92\% \\  & HP30 & 2.04 & 2.78 & 3.83 & 2.09 & 2.59 & 2.57 & \(-\)2.30\% & 6.82\% & 32.80\% \\ \cline{1-1}  & XMI8 & 1.41 & 2.40 & 4.65 & 1.44 & 2.24 & 4.32 & \(-\)2.43\% & 6.61\% & 7.01\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: RMSE results and improvement percentages of static datasets using the vertical velocity constraint. Figure 10: Velocity and position errors of dynamic dataset (HP30). (**a**) Velocity error; (**b**) position error. In particular, the improvement in HP40 and HP30 is obvious, but not that for XMI8. The improvement percentages for XMI8 are, respectively, 10.80% and 7.01% in the static and dynamic datasets. The reason for the different effects is that the velocity estimation performance of XMI8 is relatively satisfactory, and the constraint would not always enable the task to be performed over the data collection period. Considering the horizontal position, the enhancement in the static datasets is stable, but the improvement percentage is slight. For the dynamic datasets, the position accuracy is degraded in the east component, and it is improved in the north component for all smartphones. This could be due to the satellite geometry occurring during data collection. Overall, using the vertical velocity constraint can provide notable vertical positioning performance improvement, but the horizontal improvement is not obvious. To analyze the cause of positioning accuracy decreasing during 06:50-07:00, we calculated the position dilution of precision (PDOP) value of each epoch. The PDOP value is influenced by the satellite geometry, and it can represent the observation conditions in different environments [47]. In particular, the environment can worsen when the PDOP is higher, and the environment can be satisfactory when the PDOP is low. The PDOP value series of the HP30 dynamic dataset is shown in Figure 11. It can be seen in the figure that the PDOP increases in some periods, especially during 06:50-07:00. The reason for this is that the vehicle moved along a road surrounded by tall buildings, which can obstruct satellite signals. Overall, the positioning accuracy decreasing in this period could be due to the vehicle moving through a region with an unsatisfactory observation environment. ### Performance of Direction Constraint

For the static datasets, the direction constraint was invalid. Therefore, we only applied the car-borne dynamic datasets to analyze the performance of the direction constraint. As the direction of the dynamic data collection changed frequently and is inconvenient to use, we chose a short period of data for our analysis, and the trajectory and heading direction are displayed in Figure 12. It can be seen in the figure that the trajectory is approximately linear, and the range of the heading direction is 254\({}^{\circ}\) to 262\({}^{\circ}\). At this stage, we set the constraint range to 250\({}^{\circ}\)-270\({}^{\circ}\) to ensure its effectiveness. Note that this information can be obtained from the Internet or other sources in real-world applications.