I need to find the closest coordinates (lat,lon) to a given coordinates-point, out of a set of given coordinates. Similarly to this question: Find the closest coordinate from a set of coordinates
However I also need to make sure it's "straight ahead", on the same line (with a certain maximum deviation of, say 15 degrees).
One way is to get the closest points - and then check the degrees between the origin and it for each and see it it's less than the maximum, is this the best way?