Turning a phone into a digital tape measure