## 2 Proposed Convolutional Neural Network Based Multipath Detection Method
The values of CNR\({}_{\rm{max}}\) and CNR\({}_{\rm{min}}\) are set as 60 and 30 in this research because this range covers most of the observed CNR in the direct-signal only and multipath contaminated data. An example plot of CNR in 24 h is shown in Figure 3. Unlike CNR, MP is not bounded, the logarithmic function is used in Equation (9) to scale MP\({}_{\rm i}^{0}\) to the range within activation range of sigmoid function, and then sigmoid function is used to make sure MP\({}_{\rm i}^{s}\) is within [0, 1]. \(\frac{\rm{MP}_{\rm i}^{0}}{|\rm{MP}_{\rm i}^{0}|}\) can assure that MP\({}_{\rm i}^{s}\) has a consistent positive or negative sign with MP\({}_{\rm i}^{0}\). \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Satellite** & \begin{tabular}{c} **Observation** \\ **1** \\ \end{tabular} & \begin{tabular}{c} **Observation** \\ **2** \\ \end{tabular} & \begin{tabular}{c} \(\ldots\) \\ **\(\rm{n-1}\)** \\ \end{tabular} & \begin{tabular}{c} **Observation** \\ **\(\rm{n}\)** \\ \end{tabular} \\ \hline PRN k & \begin{tabular}{c} CNR\({}_{\rm i}\) \\ MP\({}_{\rm 1}\) \\ \end{tabular} & \begin{tabular}{c} CNR\({}_{\rm 2}\) \\ MP\({}_{\rm 2}\) \\ \end{tabular} & \
\begin{tabular}{c} \(\ldots\) \\ \(\rm{MP}_{\rm n-1}\) \\ \end{tabular} &
\begin{tabular}{c} CNR\({}_{\rm n}\) \\ MP\({}_{\rm n}\) \\ \end{tabular} \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Input time-series data structure; PRN denotes Pseudo Random Number. If the detector is untrained, convolution filters are trained for MP and CNR by SAE, respectively. The training is implemented in minFunc, developed by [PERSON] (2016). After tuning, the parameters for convolution filters used in this work are: the number of filters = 4, the length of each filter = 5, which proved to give best performance (more detail is presented in Section 5). 4. Using Equations (3) and (4) to compute the feature activations of each filter throughout the network in the convolution layer. 5. In the pooling layer, the feature maps are subsampled to reduce data resolution. The determination of subsampling factor is presented in Section 5. The process of steps 3 to 5 is illustrated in Figure 4. In the figure, the number of convolution filters is 4, convolving a single filter with a length of m over a scaled input time series with a length of n giving feature activation with a length of n - m + 1. Figure 4: Feature extraction with CNN. Figure 3: An example of CNR of all GPS satellites with satellite elevation angles in 24 h.  
Two classifiers, softmax and random forest, are compared in this work to select a suitable classifier and optimise the performance of the proposed method. The convolved and pooled feature maps of CNR and MP are combined together and then fed into classifiers as input data. For random forest, a Matlab script randomForest [31] is used in the implementation with 100 trees and each tree will grow to its maximum depth. Two types of data are used to validate the proposed method: the simulated data collected from a Spient GS8000 GNSS signal simulator (San Jose, CA, USA) in a simulated urban canyon environment and real data collected in low multipath and severe multipath environments. Two types of labels are used for real and simulated data: direct-signal only measurement and multipath measurement. The details of data labelling are described in the following section.