# GNSS Spoofing Identification and Smoothing Localization Method for GNSS/Visual SLAM System
## 4 Simulation results
### Parameter Analysis
Then, we select \(E_{d}=\{0.5\) m, \(2.62\) m, \(3.45\) m, \(4.41\) m, \(8.2\) m, \(9.35\) m, \(10.82\) m, \(16.4\) m) according to several extreme values of the system and performed simulations (\(\sigma_{\rm G}+\sigma_{\rm V}=2.62\) m, \(3\sigma_{\rm G}=3.45\) m, \(3\sigma_{\rm V}=4.41\) m, \(\sigma_{\rm G}+e_{\rm V}=8.2\) m, \(e_{\rm G}+e_{\rm V}+\sigma_{\rm G}=9.35\) m, \(\sigma_{\rm G}+e_{\rm V}+\sigma_{\rm V}=10.82\) m, \(2(e_{\rm G}+e_{\rm V})=16.4\) m). At the same time, we applied a \(\Delta l_{i}=\Delta b_{i}=15\) m spoofing offset to GNSS system and analyzed the absolute position error (APE) of the PTC-SLM method with different localization verification thresholds. The APE simulation result is shown in Figure 8 and some error parameters of the different localization verification thresholds are shown in Table 3.  
It can be seen that the change of \(E_{d}\) affects the trend of APE under different localization verification thresholds. With the increase of \(E_{d}\), the rmse of the APE changes from large to small and then increases. When the value of localization verification threshold is very small (for example \(E_{d}=0.5\) m), the PTC-SLM method will diverge during the initialization phase, making the initialization of the GNSS/Visual SLAM system fail, causing the PTC-SLM method invalid. When \(E_{d}=9.35\) m and \(E_{d}=10.82\) m, after being spoofed by GNSS spoofing terminal, the Visual SLAM system has been spoofed by GNSS due to detection failure. When GNSS spoofing stops, the offset of GNSS data frame exceeded the threshold, false alarms continue to occur. When the value of localization verification threshold is very large (for example \(E_{d}=16.4\) m), the PTC-SLM method cannot detect GNSS spoofing and the method is invalid. Therefore, the minimum distance of GNSS spoofing that our method can detect is limited to \(2E_{d}\). Among them, when \(E_{d}=8.2\) m, the absolute error of  
Figure 7: The joint probability density distribution of the GNSS/visual SLAM system. (**a**) Total joint probability, (**b**) Joint probability greater than 99.37%. the method is the smallest, which is consistent with the theoretical analysis. So we set the localization verification threshold as \(E_{d}=e_{\text{G}}+e_{\text{V}}=8.2\) m in the subsequent experiments. In order to analyze the influence of the location verification threshold of inducing spoofing on the algorithm, the segment from 450 s to 460 s of the data set is exposed to a GNSS inducing spoofing (a 0.5 m distance is superimposed at each GNSS localization moment). We assume the size of the window W is 10. Then, we selected \(E_{s}=\{8.2\text{ m},\ 11.5\text{ m},\ 13.1\text{ m},\ 14.7\text{ m},\ 26.2\text{ m},\ 34\text{ m},\ 48 \text{ m},\ 82\text{ m}\}\) according to several values of the system and performed simulations (\(e_{\text{G}}+e_{\text{V}}=8.2\text{ m},\ \text{W}\cdot\sigma_{\text{G}}=11.5 \text{ m},\ \text{W}\cdot\sigma_{\text{V}}=14.7\text{ m},\text{W}\cdot(\sigma_{ \text{G}}+\sigma_{\text{V}})=26.2\text{ m},\text{W}\cdot e_{\text{G}}=34\text{ m},\text{W}\cdot e_{\text{V}}=48\text{ m},\text{W}\cdot(e_{\text{G}}+e_{\text{V}})=82\text{ m}\}\). The results of absolute position error (APE) under the PTC-SLM method with different localization verification thresholds of inducing spoofing are shown in Figure 9 and some error parameters of the different localization verification thresholds are shown in Table 4. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \(E_{d}\) & Max/m & Mean/m & Median/m & Min/m & Rmse/m & Std/m \\ \hline
0.50 m & 60.84 & 24.55 & 19.78 & 0.43 & 30.66 & 18.37 \\
2.62 m & 3.42 & 1.22 & 1.19 & 0.06 & 1.28 & 0.38 \\
3.45 m & 3.84 & 1.22 & 1.18 & 0.06 & 1.28 & 0.40 \\
4.41 m & 4.08 & 1.23 & 1.20 & 0.11 & 1.29 & 0.40 \\
8.20 m & 2.95 & 1.22 & 1.19 & 0.07 & 1.27 & 0.36 \\
9.35 m & 19.65 & 3.28 & 1.28 & 0.19 & 5.46 & 4.37 \\
10.82 m & 18.26 & 1.88 & 1.20 & 0.09 & 3.11 & 2.48 \\
16.4 m & 11.32 & 1.82 & 1.19 & 0.11 & 2.98 & 2.36 \\ \hline \hline \end{tabular}
\end{table}