In heterogeneous environments, the snapshot under test (SUT) and the corresponding training samples are usually not independent and identically distributed, which seriously degrades the clutter suppression performance of space-time adaptive processing (STAP). To solve this problem, this paper proposes a method which can select the training samples with similar clutter characteristics to that of the SUT. The proposed method constructs a novel united generalised inner product (UGIP) statistic with the sub-aperture clutter covariance matrix (CCM) of the SUT and that of any other snapshot. The smaller the statistic is, the more similar the corresponding two snapshots are. Therefore, the snapshots with smaller UGIPs will be selected as training samples. The proposed method effectively improves the quality of the selected training samples for STAP and a better estimate of the CCM can be obtained. Simulation experiments verify the effectiveness of the proposed method with both simulated data and measured data.This is an open access article under the terms of the Creative Commons Attribution-NonCommercial-NoDerivs License, which permits use and distribution in any medium, provided the original work is properly cited, the use is non-commercial and no modifications or adaptations are made.