Abstract:WiFi channel state information (CSI) has emerged as a powerful tool for indoor drone localization, owing to its high temporal resolution and rich environmental features. However, the accuracy of CSI-based systems is significantly compromised by amplitude distortion induced by the receiver′s automatic gain control (AGC) circuit, coupled with multipath effects and dynamic noise interference in complex indoor environments. To address these challenges, this paper proposes a novel CSI-based indoor drone localization method that integrates AGC compensation with multi-scale outlier processing. The automated data collection and annotation system is established using passive CSI sniffing and Aruco visual markers, enabling non-intrusive acquisition of CSI data during the drone′s normal communication. The dynamic AGC compensation algorithm, leveraging real-time hardware gain feedback, is introduced to effectively correct the amplitude distortion and recover the true signal amplitude. Furthermore, the multi-scale outlier processing scheme combining Hampel filtering and density-based spatial clustering of applications with noise (DBSCAN) clustering is employed to respectively identify and filter out isolated pulse noise and dense noise clusters, thereby enhancing the robustness and reliability of signal features in complex settings. The lightweight residual network-one-dimensional convolutional neural network (ResNet-1DCNN) is subsequently constructed to extract deep features from the optimized CSI amplitude sequences for efficient location classification. Comprehensive evaluations demonstrate that the proposed AGC compensation and outlier processing strategies significantly improve CSI signal quality, enabling the model to learn more robust location-specific features. The proposed localization method achieved an overall accuracy of 98% in the test environment, representing a performance improvement of nearly 29% compared to the unoptimized baseline. This work provides a viable and effective solution for high-precision indoor drone localization and confirms its potential for real-time application.