Measuring the error of localization