Train motion model calibration is crucial to ensure the accuracy and performance of any railway algorithm that requires reproducing and predicting train dynamics. The calibration must be robust against measurement outliers and missing data. However, such a robust train motion model calibrator is still missing in the literature. In this paper, we propose a robust parameter estimator based on M-estimation for calibrating the train motion model using historical location, speed and engine torque measurements. M-estimation utilizes an objective function that reduces the influence of outliers on the estimation, making the estimates more robust. The estimation problem is solved iteratively as a weighted least squares regression. We tested 10 error measures, finding that Fair's is the one performing best for estimating the running resistance. The maximum tractive and brake effort and the braking style of drivers were also quantified by filtering effort measurements and deceleration rates with a sliding median filter. We show the performance and robustness of the proposed method in a real case study, using data from trains running in the Dutch railway network. The statistics obtained show that M-estimation outperforms Ordinary Least Squares and that in manually-driven trains the accuracy of any train motion model relies heavily on the actual characteristics of manual driving.