## 5 Tuning of Parameters and Comparison between Classifiers  
Similar to other machine learning approaches [20; 21] and filtering approaches [37], parameter tuning is an essential step. GPS L1 C/A data in Datasets SIMTU, STU, and KTU are used to tune a parameter (length of input time window) in the proposed method. Accuracy (its definition can be found in Table 2) is the criterion for parameter tuning. Figure 8 illustrates the detection accuracy of using MP, CNR and their combination when changing the length of input time windows. All the data in Figure 8 show that the combination of MP and CNR improves accuracy when compared with using MP or CNR alone. As shown in Figure 8a, increasing the length of input time window improves the accuracy on simulated data at the expense of increased detection response. Figure 8b,c show that, when the length of input time window exceeds 20 s on real static and kinematic data, the detection accuracy stops increasing. As a result, the length of input time window is set to 16 s to optimise the detection performance on real data with the shortest response time. Other parameters (the number of filters, length of each filter, and subsampling factor) are tuned with the same real datasets (SIMTU, STU, and KTU) to optimise detection performance in real scenarios. Table 7 shows the detection results on tuning Dataset KTU using different number of filters with different lengths. From the table, it can be seen that changing these two parameters have slight effects on accuracy. Parameters with the best performance in tuning (i.e., a filter patch composed of four filters with a length of 5 for each filter) are used in this research. Figure 8: Detection results using feature of MP, SNR and their combination when changing the length of input time window with Dataset SIMTU (**a**); STU (**b**); and KTU (**c**). Figure 9 shows the detection results using different subsampling factors with Datasets STU and KTU. The results show that accuracy gradually decreases for kinematic data with the increase of subsampling factor. This is due to correspondingly reduced resolution of feature maps after convolution operation. The value of subsampling factor is set to 2 in this study to save on computation burden of a classifier without compromising on detection accuracy. With tuned parameters in CNN, the performances of two classifiers, softmax and random forest, on GPS L1 C/A data in Datasets SIMTU, SIMTE, STU, STE, KTU, and KTE are presented in Table 8. The results show that the random forest classifier performs better than a softmax classifier in kinematic data by 1% to 10%, especially for the simulated data. However, the softmax classifier slightly outperforms random forest in static data by about 2%. This is because the softmax classifier is based on probability theory so that it performs better in static data with more predictable multipath errors. Uncertainty is involved (e.g., rapid changing of environment) in kinematic data, and decision tree based random forest outperforms because it is a highly robust classifier [27]. Therefore, the proposed method uses a softmax classifier for static data and random forest classifier for kinematic data. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Detection Accuracy (\%)**} & \multicolumn{4}{c}{**Length of Each Filter**} \\ \cline{2-5}  & **3** & **4** & **5** & **6** \\ \hline \multirow{3}{*}{Number of filters} & 3 & 58.99 & 58.91 & 58.92 & 58.86 \\  & 4 & 58.80 & 59.03 & 59.38 & 58.71 \\ \cline{1-1}  & 5 & 58.67 & 59.21 & 58.90 & 58.57 \\ \cline{1-1}  & 6 & 59.31 & 59.09 & 58.62 & 58.60 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Detection results of changing the number of filters and length of each filter with Dataset KTU.