sensor distance function fixed.