# Credible Navigation Algorithm for GNSS Attack Detection Using Auxiliary Sensor System
## 3 Credible Navigation Algorithm  
### Algorithm Model  
By setting the size of the credible verification threshold and the size of the credible verification window, the ACNA algorithm monitors GNSS drift, effectively identifies GNSS jump/slow attack, and improves the credibility of the system. The definitions of GNSS drift, credible verification window and credible verification threshold are given below. GNSS drift: The offset of the GNSS positioning result relative to the positioning result of the auxiliary sensor system. The GNSS drift \(\Delta\rho_{k}\) at time \(k\) is  
\[\Delta\rho_{k}=\sqrt{\left(e_{k}^{\text{G}}-e_{k}^{\text{DI}}\right)^{2}+\left( n_{k}^{\text{G}}-n_{k}^{\text{DI}}\right)^{2}+\left(u_{k}^{\text{G}}-u_{k}^{ \text{DI}}\right)^{2}}. \tag{11}\]  
Credible verification window: The credibility of GNSS is determined using the credible verification window as a scope of judgment. During the process of credibility determination, the drift \(\Delta\rho\) over several consecutive positioning time slots is analyzed to determine whether the GNSS signal is credible. The number of consecutive positioning time slots mentioned above is in fact the size of the credible verification window. The credible verification window includes the jump verification window \(n_{\text{I}}\), and the slow-change verification window \(n_{\text{s}}\). Here, \(n_{\text{j}}\) is used to verify whether the GNSS has experienced a GNSS jump attack while \(n_{\text{s}}\) is used to verify whether the GNSS has experienced a GNSS slow-change attack. In the credibility determination process, the credibility verification window will continue to slide over time. Credible verification threshold: During the movement of the mobile terminal, the trajectories of two adjacent points are correlated. The possible position range of the mobile terminal at time \(k+1\) can be predicted according to the position at time \(k\), the velocity at time \(k\), the yaw angle at time \(k\) and the measurement error of GNSS and the auxiliary sensor system from time \(k\) to time \(k+1\). The GNSS signal lies within a certain error range: if it exceeds a certain error range, the GNSS signal can be considered abnormal. At this point, the radius of the abnormal position beyond the certain error range is set as the credible threshold. During the determination of the credible verification window, it is required to keep monitoring whether GNSS drift exceeds a certain threshold. This threshold is defined as the credible verification threshold. Our method sets separate thresholds for GNSS jump attacks and GNSS slow-change attacks as \(Th_{\text{j}}\) and \(Th_{\text{s}}\). If the signal continues to be abnormal, GNSS jump/slow-change attack can be detected based on the analysis of measurement information in the credible verification window range. If the credibility verification threshold is too high, a missing alarm may be triggered. If the credible verification threshold is too low, a false alarm may be triggered. If there is only one or two signal abnormalities within a certain period of time, it may be a \"GNSS signal false point\", which may be caused by other factors. In order to remove these unwanted signal fluctuations, appropriate parameter values need to be set to filter them out to effectively eliminate false points, improve the accuracy and reduce the false/missing alarm rate of the system. According to the state and prediction location results of ACNA, the location of points is divided into four categories: (1) \(TP\): predict as normal, in fact normal, (2) \(FP\): predict as normal, in fact abnormal, (3) \(TN\): predict as abnormal, in fact abnormal, (4) \(FN\): predict as abnormal, in fact normal.