Localization error minimization method with Regulated Neighborhood Distance