## 2 Materials and Methods
### C/N\({}_{0}\) Distribution Map Construction Method  
Grayscale images are a common type of image in computer vision applications. In a grayscale image, the brightness of each pixel \((i,j)\) is represented by a grayscale value \(Gray(i,j)\), which is typically expressed as an 8-bit integer ranging from 0 to 255. In this case, 0 represents black, 255 represents white, and intermediate values correspond to varying shades of gray [27]. Since grayscale images contain only brightness information, they simplify image representation complexity while retaining the essential features of the image. Grayscale images are often used in operations such as edge detection, image segmentation, and feature extraction, enhancing the efficiency and reliability of image processing and analysis [28]. The GNSS receiver information reported by smartphones in Figure 1 includes receiver location data and C/N\({}_{0}\) information, denoted as \(\textbf{{X}}_{k}=\left[\tau_{k_{b}},y_{k_{c}}\left(C/N_{0}\right)_{eq,kB}\right]\), which exhibits a high degree of similarity to the grayscale information of images. In this study, we utilize the information \(\textbf{{X}}_{k}\) relayed by the GNSS receivers embedded in smartphones to construct the C/N\({}_{0}\) distribution map. In this context, the terms \"smartphone\" and \"GNSS receiver\" refer to the same device. Therefore, a method is proposed to construct a C/Ndistribution map by projecting the C/N\({}_{0}\) data collected from numerous GNSS receivers in the monitoring area onto a grayscale image. After generating the C/N\({}_{0}\) distribution map, target detection methods from image processing can be used to detect GNSS interference sources as targets, thereby achieving the effective localization of multiple GNSS interference sources in the scenario of this paper. Algorithm 1 presents the pseudocode for constructing the C/N\({}_{0}\) distribution map, where the navigation data reported by receivers in the monitored area is used to define the map dimensions and pixel grayscale values. Steps 1 to 3 calculate the receiver density and interference source localization accuracy within the monitored area to obtain the width and height of the C/N\({}_{0}\) distribution map. In this algorithm, the C/N\({}_{0}\) value under interference-free conditions is set to \((C/N_{0})_{\max}\), and the receiver's C/N\({}_{0}\) decreases as the level of interference increases [29]. To ensure that the generated C/N\({}_{0}\) distribution map effectively reflects the degree of interference experienced by the receivers, a C/N\({}_{0}\) threshold is set to \((C/N_{0})_{CT}\). Grayscale values for C/N\({}_{0}\) values below the threshold \((C/N_{0})_{CT}\) are set to 0 and values under interference-free conditions are set to 255, so that the receiver's C/N\({}_{0}\) value \([(C/N_{0})_{CT},(C/N_{0})_{\max}]\) can be linearly mapped to grayscale values from 0 to 255 using the following formula:  
\[Gray_{I}=\left\lfloor\frac{255\cdot[(C/N_{0})_{I}-(C/N_{0})_{CT}]}{[(C/N_{0}) _{\max}-(C/N_{0})_{CT}]}\right\rfloor \tag{8}\]  
where \((C/N_{0})_{I}\) represents the C/N\({}_{0}\) measurement at a specific receiving point, and \(Gray_{I}\) is the corresponding grayscale value at that point. Steps 5 to 13 use the C/N\({}_{0}\) measurements reported by the receivers in the monitored area to fill each pixel of the C/N\({}_{0}\) distribution map, in which Step 6 mainly involves searching for data points \(\left\{X_{l,D1},X_{l,D2},\ldots,X_{l,DM}\right\}\) whose distance from the pixel is less than \(Dp\), and \(DM\) is the number of points that satisfy the condition. Step 7 calculates the weighted average value \((C/N_{0})_{IM}\) of the C/N\({}_{0}\) data for the \(DM\) data points, where the weight is the inverse of the distance to that pixel. If \((C/N_{0})_{IM}>(C/N_{0})_{CT}\), then the gray value corresponding to the value \((C/N_{0})_{IM}\) needs to be calculated using Formula (8) and written to the corresponding pixel. If \((C/N_{0})_{IM}\leq(C/N_{0})_{CT}\), then the gray value 255 is written to that pixel.