Distance measurements with high accuracy