Added support for coordinates-to-distance and coordinates-to-virtual-beam
Necessary for c2d and c2b