Hello FS93 ,
By default, coordinates are taken from right rectified frame. You can also align the depth with other streams, eg. color, example here.
It's the Z coordinate of the object, not the distance to the object. For the actual distance to the object, you would need to use x/y/z and pitagoras formula.
Thanks, Erik