Given the coordinate of the sensor's origin (ox, oy, oz), the coordinate of the point (px, py, pz), and the sensor's axis (ax, ay, az), the
distance is:
d= math.sqrt(math.pow(ox-px,2)+math.pow(oy-py,2)+math.pow(oz-pz,2))
the
angle is:
a=math.acos((ox*(px-ax)+oy*(py-ay)+oz*(pz-az))/d)