Integrated distance measuring system