added conversion from IR voltage to dist