I want to calculate the angular distance between two points, with respect to a third point (i.e., the number of angular degrees by which bearings to each of these points differ, from the third point).
In other words, I need an angle between two vectors with a single origin, but in my dataset I only have the x,y coordinates for the points.
I have tried the atan2
function, but it calculates the angle with reference to the x axis, which is different from what I need.
I would be surprised if there was no ready function that takes x,y point coordinates as input and returns the angular distance but I can't find a suitable one.