# Credible Navigation Algorithm for GNSS Attack Detection Using Auxiliary Sensor System
## 3 Credible Navigation Algorithm
### Algorithm Model
Then, the accuracy rate of navigation prediction \(P_{\text{D}}\) is  
\[P_{\text{D}}=\frac{TP+TN}{TP+FN+FP+TN}. \tag{12}\]  
The false alarm rate \(P_{\text{FA}}\) is  
\[P_{\text{FA}}=\frac{FP}{FP+TN}. \tag{13}\]  
The missing alarm rate \(P_{\text{MD}}\) is  
\[P_{\text{MD}}=\frac{FN}{TP+FN}. \tag{14}\]  
In order to improve the credibility of the ACNA algorithm, it is necessary to set the appropriate credible verification threshold and credible verification window. According to the minimum error criterion [29], minimizing the sum of integrity and availability risks can maximize the accuracy of the navigation algorithm. Therefore, this then becomes an optimization problem. The optimization objective is to maximize the accuracy rate of the algorithm and minimize the false alarm rate and missing alarm rate of the algorithm. That is:  
\[\max(P_{\text{D}})\wedge\min(P_{\text{FA}}+P_{\text{MD}})\]  
s.t. \[n_{\text{j}}>1 \tag{15}\]  
\[n_{\text{s}}>n_{\text{j}} \tag{16}\]  
\[Th_{\text{j}}\geq\sigma^{\text{G}} \tag{17}\]  
\[Th_{\text{j}}\leq 3\sigma^{\text{G}} \tag{18}\]\[Th_{s}\geq\sigma^{G} \tag{19}\] \[P_{\text{D}}=\frac{TP+TN}{TP+FN+FP+TN}. \tag{12}\]0 (20) \[P_{\text{D}}=\frac{TP+TN}{TP+FN+FP+TN}. \tag{12}\]1  
Equations (15) and (16) are credible verification window constraints. The jump attack of GNSS means that the GNSS drift exceeds the jump verification threshold for \(n_{\rm j}\) consecutive moments. The jump attack detection method can be used to detect the \"GNSS signal false points\" of the system, improve the accuracy rate, and reduce the false alarm rate. Therefore, \(n_{\rm j}\) should satisfy \(n_{\rm j}>1\). The slow-change verification window \(n_{\rm s}\) is used after the jump attack detection. Therefore, \(n_{\rm s}\) is set to be larger than the jump verification window \(n_{\rm j}\) to optimize the algorithm running time. Equations (17)-(21) are credible verification threshold constraints. The GNSS positioning solution follows a Gaussian distribution, with the mean and standard deviation being \(\mu^{G}\) and \(\sigma^{G}\). According to the Pauta criterion (\(3\sigma\) criterion), the possibility that the GNSS positioning solution exceeds the range \((\mu-3\sigma,\mu+3\sigma)\) is only \(0.27\%\). Thus, an error of \(\pm 3\sigma\) can be used as the limit error of the GNSS positioning settlement result. To identify GNSS jump attack, the choice of \(Th_{\rm j}\) should not exceed the limit error of GNSS at \(3\sigma^{G}\). At the same time, to ensure the positioning accuracy of the system, \(Th_{\rm j}\) should not be lower than the GNSS error at \(\sigma^{G}\). Thus, \(Th_{\rm j}\) should satisfy Equations (17) and (18). As for the slow-change attack of GNSS, the location domain changes by only a small amount per unit time, which is difficult to detect by jump verification. The selection of \(Th_{\rm s}\) should be greater than the measurement error of the GNSS system and the cumulative measurement error of the auxiliary sensor system. At each unit time in the credible verification window, the measurement errors of the GNSS system are relatively independent, and they all satisfy the \(3\sigma\) principle. \(Th_{\rm s}\) should not be lower than the GNSS error at \(\sigma^{G}\) and not exceed the limit error of GNSS at \(3\sigma^{G}\) during the slow-change verification window \(n_{\rm s}\). Thus, \(Th_{\rm s}\) should satisfy Equations (19) and (20). The cumulative measurement error of the auxiliary sensor system \(P^{\rm DI}\) is the cumulative measurement error of the auxiliary sensor system during the credible verification window. The measurement error of the auxiliary sensor system will continue to accumulate if there is no GNSS observation to correct and calibrate the auxiliary sensor system. Therefore, \(P^{\rm DI}\) can be calculated as  
\[P_{\text{D}}=\frac{TP+TN}{TP+FN+FP+TN}. \tag{12}\]2  
where \(\varepsilon_{i}^{\rm DI}\) is the measurement error of the auxiliary sensor system at time \(i\).