Copied the value of a double to make distance_calibration more thread safe.