The influence of the outliers on the Kalman filter is analyzed.A method based on M-estimate dealing with outliers is proposed.The method has the immunity to not only single outlier but also a mass of outliers.Simulation test has validated this method.