# An Accurate GNSS Spoofing Detection Method Based on Multiscale Eye Diagrams
## 3 Spoofing Detection Method
### MSC-MMP Performance Analysis  
To verify the performance and advantages of the MSC-MMP method proposed in this paper in terms of edge detection, an eye diagram dataset was constructed, containing 100 images. The dataset includes eye diagrams of single and multiple signals at different powers, as well as similar and different signal superpositions. Morphological preprocessing and edge labeling steps were performed on these images to obtain the corresponding edge labels. We conducted comparative experiments using five commonly used edge detection algorithms and the MSC-MMP algorithm (Figure 3). The preprocessed eye diagram (Figure 3a) was employed as the original image for edge detection. The MSC-MMP algorithm not only preserved the integrity of the eye diagram edges but also mitigated the interference of textural edges. The detected edges presented the fewest discontinuities and no extraneous noise. To assess the efficacy of the edge detection process more accurately, the optimal dataset scale (ODS), a commonly employed metric in edge extraction, was utilized as the primary evaluation criterion. The optimal dataset scale precision (ODS-P) is a metric that quantifies the mean precision of an algorithm. It represents the proportion of positive samples whose predicted results are true positive samples, which emphasizes the accuracy of the prediction. The optimal dataset scale recall (ODS-R) refers to the proportion of items that are correctly identified as positive samples among all true positive samples, thereby emphasizing the algorithm's coverage of true positive samples. The optimal dataset scale F score (ODS-F) is a performance measure that considers both precision and recall. It is a comprehensive metric for evaluating overall performance and is expressed as follows:  
\[ODS-F=\frac{2(ODS-P\cdot ODS-R)}{ODS-P+ODS-R} \tag{14}\]  
The efficacy of the generated eye diagram dataset was evaluated, and the findings are presented in Table 1. The results indicate that, among all the tested algorithms, including Log, Zero Crossing, Sobel, Prewitt, and Canny, the accuracy of each exceeded 99.8%, indicating that these algorithms demonstrate minimal error in edge recognition and rarely misidentify non-edge points as edge points. This result is primarily due to the fact that the images used in the experiment were generated using receiver correlation values, resulting  
Figure 3: Edge detection results of various methods for an eye diagram, including Log, Prewitt, Sobel, Zero crossing, Canny, and MSC-MMP algorithm. The edges are correctly delineated and continuous, and the absence of noise indicates a favorable outcome. in minimal noise. Moreover, the Log, Zero Crossing, Sobel, Prewitt, and Canny algorithms are exceptionally sensitive to edge transitions by design, which enables them to effectively avoid false positives during the edge detection process, resulting in very high ODS-P scores. However, the recall rates of the Log, Zero Crossing, Sobel, Prewitt, and Canny algorithms are relatively low. This is because the Log and Zero Crossing algorithms tend to miss regions with smooth or blurred edge transitions when processing the fine details of the eye diagram. The Sobel and Prewitt algorithms are prone to losing some true edges when the edge strength is weak. While the Canny algorithm effectively suppresses noise and detects prominent edges, its ability to recognize more subtle edge transitions is weaker, as it tends to focus more on the more distinct edges. In contrast, the MSC-MMP algorithm uses a multiscale edge image fusion strategy. Although it sacrifices some precision to detect more genuine edges, it can detect more edge information across different scales, successfully identifying more true edges and improving the recall rate, achieving an ODS-R of 95.4%. In terms of the ODS-F score, which combines precision and recall, the MSC-MMP algorithm demonstrated the optimal balance between precision and recall, with a score of 0.970.