# GNSS Spoofing Identification and Smoothing Localization Method for GNSS/Visual SLAM System
## 2 System Model
### GNSS Coordinate Calculation and Conversion  
The coordinate calculation of GNSS receiver is based on the information of four or more satellites received by the GNSS receiver. There are two steps. First, calculate the pseudorange of the GNSS receiver based on the received information, and then calculate the localization coordinates of the GNSS receiver based on the pseudorange.  
The pseudorange is calculated based on the distance between the satellite and the GNSS receiver, taking into account the errors of ionosphere and troposphere. Assuming that the receiver localization coordinate is \(\mathbf{x}_{\rm A}^{\rm G}=(x_{\rm A},y_{\rm A},z_{\rm A})\), the satellite coordinate obtained by the receiver through the analysis of the received satellite signals is \(\mathbf{x}_{n}^{\rm S}=(x_{n}^{\rm S},y_{n}^{\rm S},z_{n}^{\rm S})\), where \(n\) represents the satellite number, \(\rho_{n}\) represents the pseudorange correction value of the nth satellite, \(t_{\rm u_{A}}\) represents the clock error between the receiver and the satellite under the coordinates \(\mathbf{x}_{\rm A}^{\rm G}=(x_{\rm A},y_{\rm A},z_{\rm A})\). In addition to the clock error \(\delta t^{(u)}\) generated by the propagation geometric distance, the clock error \(t_{\rm u_{A}}\) also includes the satellite clock error \(\delta t^{(t)}\), ionospheric delay \(\delta t^{(\rm I)}\), and tropospheric delay \(\delta t^{(\rm I)}\), thus  
\[t_{\rm u_{A}}=\delta t^{(u)}-\delta t^{(\rm I)}+\delta t^{(\rm I)}+\delta t^{( \rm I)} \tag{1}\]  
In addition, the receiver will generate measurement noise \(\varepsilon_{\rho}(t)\) during the measurement process. Then, the pseudorange \(\rho_{i}\) solved by the GNSS receiver is  
\[\rho_{i}=\sqrt{\left(x_{\rm A}-x_{i}^{\rm S}\right)^{2}+\left(y_{\rm A}-y_{i} ^{\rm S}\right)^{2}+\left(z_{\rm A}-z_{i}^{\rm S}\right)^{2}}+ct_{\rm u_{A}}+ \varepsilon_{\rho}(t) \tag{2}\]  
where \(c\) is the velocity of light.  
The satellite clock error, ionospheric delay and tropospheric delay can all be calculated, which can be regarded as known quantities. The measurement noise generated by the receiver is related to the performance of the receiver itself.  
Generally, the possibility that the GNSS localization result exceeds the range \((\mu-3\sigma,\mu+3\sigma)\) is only 0.27% according to the Pauta criterion (3\(\sigma\) criterion). Thus, an error of \(\pm 3\sigma\) can be used as the limit error of the GNSS localization result.  
According to the pseudorange positioning equation [16], the localization coordinate \(\mathbf{x}_{\rm A}^{\rm G}\) and clock error \(t_{\rm u_{A}}\) of the receiver can be obtained, which is the localization coordinates of the receiver in the Earth Centered Inertial Coordinate System (ECI). Then, after the receiver's position calculation, the ECI coordinate \(\mathbf{x}_{\rm A}^{\rm G}\) is converted to the Longitude Latitude Altitude coordinate system (LLA) to obtain the receiver's current longitude, latitude and  
Figure 1: GNSS spoofing identification and smoothing localization model.  
altitude \(x_{A}^{L}=(l_{o},l_{a},h)\), which is the absolute localization of the mobile terminal in the world coordinate system.  
The results of the GNSS position calculation will provide the absolute position information of the mobile terminal in the initialization of the system, and perform mutual verification and smoothing localization with the visual SLAM system in the back-end of the system.