Batch Measurement Error Covariance Estimation for Robust Localization