I am trying to determine if a point lies between two bearings from a central point.
The diagram below attempts to explain things
- I have a central point labelled A
- I have two points (labelled B & C) which provide the boundaries of the search area (based on bearing only - there is no distance element required).
- I'm trying to determine if point D is within the sector formed by A-B and A-C
- I've calculated the bearings from A to each B & C
- In my real scenario the angle created between the bearings can be anything from 0 to 360.
There are some similar questions & answers however in my case I'm not interested in restricting my search to the radius of a circle. And there seems to be some implementation issues around angle size and the location of the points in terms of clockwise vs counter-clockwise
It seems so simple in theory but my maths is clearly not up to scratch :(
Any advice or pseudo-code would be greatly appreciated.