An algorithm for precise localization of measurements in rolling stock-based diagnostic systems