Improved calibration for ruler
