A spoofing detection algorithm based on sum of absolute in-phase branch outputs(SAI-BO)is proposed to address the issue of suboptimal spoofing detection performance of traditional detection algorithms in carrier synchronous spoofing scenarios where power varies over time.To improve spoofing detection performance,the SAIBO-moving average(SAIBO-MA)algorithm is further proposed.The construction process of the SAIBO-MA algorithm uses the output results of the in-phase branch of the receiver's tracking loop to take absolute values and sum them to form the SAIBO detection metric.After performing moving average processing,the SAIBO-MA detec-tion metric is obtained.The experiment uses Data Scenario 7(DS7)of Texas Spoofing Test Bat-tery(TEXBAT)from the University of Texas at Austin as the dataset,and compares and analyzes the detection probability,number of spoofing decisions,and robustness of the three algorithms for spoofing detection.The experimental results indicate that SAIBO-MA has higher detection proba-bility and accuracy,better immediacy and robustness,and a wider detection range.The proposed SAIBO-MA algorithm overcomes the shortcomings of traditional algorithms and has better spoo-fing detection performance.