# GNSS Spoofing Identification and Smoothing Localization Method for GNSS/Visual SLAM System
## 4 Simulation results
### Parameter Analysis  
This section analyzes the impact of time verification threshold and localization verification threshold on our proposed PTC-SLM method. Whether it is a time verification threshold or a localization verification threshold, it is related to the frequency and accuracy of the sensors in practical applications and possible spoofing scenes. Under our experimental settings and scenes, first of all, for the time verification threshold \(\delta_{\rm T}\), the GNSS frame rate for the KITTI data set we selected is 10 fps, that is, the interval between two GNSS frames is 0.1s, then when \(|\delta_{\rm T}|~{}\geq~{}0.05\) s, the window time is greater than 0.1s, there will be more GNSS frames that meet the time window requirements and enter the time verification process, which will cause data misalignment and increase the error of the method. Therefore, the time verification threshold must meet \(|\delta_{\rm T}|<0.05\) s. So, we select \(\delta_{\rm T}=\{0.01\) s, 0.02 s, 0.03 s, 0.04 s, 0.05 s, 1 s\(\}\) to calculate the absolute position error (APE) of the PTC-SLM method, and the results are shown in Figure 6. Maximum value (Max), average value (Mean), median value (Median), minimum value (Min), rmse and std of the absolute position errors of the different time verification thresholds are shown in Table 2.  
It can be seen that the change of \(\delta_{\rm T}\) affects the results of APE. As \(\delta_{\rm T}\) increases, the rmse of the PTC-SLM method decreases first and then increases. When \(\delta_{\rm T}\) is too large (such as \(\delta_{\rm T}=1\) s), the result of APE is wobbly, and the time verification loses its effect; when \(\delta_{\rm T}=0.02\) s, the result of APE is the smallest, so in subsequent experiments, the time verification threshold is selected as \(\delta_{\rm T}=0.02\) s.  
According to the analysis in Section 3.3, after the GNSS/visual SLAM system is combined, \(E_{d}\) is related to the extreme error \(e_{G}\) of the GNSS system and the extreme error \(e_{V}\) of visual SLAM system which are related to the accuracy of the sensors in different \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \(\delta_{\rm T}\) & **Max/m** & **Mean/m** & **Median/m** & **Min/m** & **Rmse/m** & **Std/m** \\ \hline
0.01 s & 15.05 & 1.20 & 1.16 & 0.09 & 1.33 & 0.57 \\
0.02 s & 8.34 & 1.19 & 1.18 & 0.13 & 1.26 & 0.42 \\
0.03 s & 11.56 & 1.19 & 1.18 & 0.02 & 1.27 & 0.44 \\
0.04 s & 38.74 & 1.32 & 1.18 & 0.16 & 2.23 & 1.79 \\
0.05 s & 41.51 & 1.31 & 1.17 & 0.16 & 2.37 & 1.97 \\
1.00 s & 22.57 & 4.99 & 5.16 & 0.10 & 5.71 & 2.78 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Error parameters of the different time verification thresholds. Figure 6: The trend of APE under different time verification thresholds. systems. For the GNSS and visual SLAM system in the KITTI dataset, we first calculate the \(\sigma_{\rm G}\) of the GNSS system and the \(\sigma_{\rm V}\) of visual SLAM system separately through simulation when there is no GNSS spoofing occurs (\(\sigma_{\rm G}=1.15\) m, \(\sigma_{\rm V}=1.47\) m). Then, substitute the value into Equation (19) and obtain the joint probability of the GNSS/visual SLAM system, as shown in Figure 7.  
From the simulation results of the joint probability density distribution, it is known that the confidence interval for the joint probability density of the GNSS/visual SLAM system to be greater than 99.37% is \(D\{x_{G}\in(-3.4,\,3.4),\,x_{V}\in(-4.8,\,4.8)\}\). That is, the limit error of the GNSS system is \(e_{\rm G}=3.4\) m, the limit error of the visual SLAM system is \(e_{\rm V}=4.8\) m. Therefore, according to Equation (30), the localization verification threshold of the system is calculated as \(E_{d}=e_{\rm G}+e_{\rm V}=8.2\) m.  
In order to analyze the influence of the location verification threshold of forwarding spoofing on the algorithm, the segment from 380 s to 410 s of the data set is exposed to a GNSS forwarding spoofing with 10m spoofing distance.