IR Distance function

Can calibrate more later.