what units are used to calculate distance