# Situational Awareness: Mapping Interference Sources in Real-Time Using a Smartphone App
## 5 In-Laboratory Tests and Calibrations
### GoF Test: Calibration of the Nominal Distributions  
The third in-laboratory test aimed to calibrate the reference distribution function of the Chi-square GoF Test. In a previous work [44; 45], the reference distribution function was computed and stored during the calibration phase executed in a portion of \"clean\" signal; in this way, the detection method was calibrated every time a channel starts tracking. The approach [44; 45] shows a drawback in the real-time application because it implies repeating the calibration for each channel and for each time the detector starts monitoring, using a portion of non-interfered signal. Therefore, in NGeneApp the calibration phase was performed in the laboratory and the reference distributions are loaded from static memory every time the receiver is switched on. Since the reference distribution depends on the C/N\({}_{0}\) of the tracked signal, the GoF method implemented in NGeneApp employs the same reference distribution for all the tracking channels which run with similar C/N\({}_{0}\). To compute such reference distributions, we simulated a dataset with eight GPS L1 signals at different power levels, using the NAVX-NCS GNSS signal generator [56]. The received power assigned to the list of satellite signals varied from \(-110\) dBm to \(-131\) dBm, with a step of 3 dB between each pair of received signals. Figure 6 shows the estimated C/N\({}_{0}\) of each PRN associated to the input power level. From the dataset, the reference distribution function for the Chi-square GoF test of each C/N\({}_{0}\) level (i.e., PRN) was computed. Then, each reference distribution was used to execute the GoF test on all the simulated signals, to empirically estimate the false alarm rate, which is expected to be zero because the signals are not spoofed. The test was conducted on about 1400 test samples for each signal. The rationale is that, if the reference distribution for a certain input power level keeps the false alarm rate close to zero, then it is suitable for the C/N\({}_{0}\) of the signal under test. The results of such a calibration test are shown in Table 4.  
Figure 5: Effect of the wideband jammer on the received PSD for different power levels: \(-60\) dBm (**a**), \(-80\) dBm (**b**), \(-95\) dBm (**c**) and \(-105\) dBm (**d**). We can see that all the PRNs which have C/N\({}_{0}\) in the same range can use the same reference distribution without significant effect on the algorithm. For example, signals in the range [48; 49; 50; 51; 52; 53; 54; 55; 56; 57; 58; 59] dBHz (e.g., PRN 1, PRN 5, PRN 6 and PRN 10) could use the reference distribution of PRN 5 with limited false alarm rate. However, from the table, we can also realize that the lower the C/N\({}_{0}\) value, the higher the false alarm rate. It means that signals with lower C/N\({}_{0}\) ratio are more sensitive to the change of reference distribution. For example, the GoF test makes the true decision (i.e., authentic signal) for PRN 22 (which has C/N\({}_{0}\) about 36 dBHz) only when using the exact reference distribution for C/N\({}_{0}\) = 36 dBHz. In the end, the grouping of C/N\({}_{0}\) levels that can share the same reference distribution is summarized in Table 5. The same procedure was performed for Galileo E1 signals, obtaining similar results.