Global Navigation Satellite System (GNSS) plays a crucial role in autonomous train positioning. However, GNSS measurements containing faults will cause a decreased positioning accuracy in the filter estimation. The traditional Kalman filter-based fault detection method assumes that the measurement noise variance is invariable, which results in an inaccuracy test statistic in a dynamic time-vary environment. To solve the problem, this paper proposed an improved two-stage fault detection method, including global and local tests. The variational Bayesian is introduced into the global test to construct the new test statistic with Mahalanobis distance for detecting the fault. Then, a subset-based local test is carried out to identify the fault measurement. The effectiveness of the proposed method was demonstrated under step and ramp faults scenarios. The results proved that the measurement noise variance directly influenced the ability of fault detection, and the proposed method provides a more reliable and accurate position.