How to calculate the angle between a rotating reference point and a static remote point at any degree of rotation?

126 Views Asked by At

Summarize the problem

I am trying to work out the relative angle/direction between two points from the reference of the first. I have two points: a rotating point A (my reference position) and a static (remote) point B which can be positioned at any distance from A from 0-360 degrees. I need to calculate the relative direction from A to B at any rotation of A.

Most basic description:

B is at a fixed positioned at 0 degrees (direct) north of A. When A is facing north B is at 0 degrees (ahead) of A. When A is facing west, B is 90 degrees (right) of A When A is facing south B is 180 degrees (behind) of A When A is facing east, B is 270 degrees (left) of A

As A rotates, how can I calculate the relative direction (in degrees) from A to B?

1

There are 1 best solutions below

1
On BEST ANSWER

Suppose $B$ is due north of $A$. If you measure $A$'s facing angle $\theta$ counterclockwise with north as $0$ then the bearing to $B$ is just that angle.

When $B$ is at an initial bearing angle $\phi$ from $A$ (measured counterclockwise) the whole picture is just rotated by $\phi$ so the facing angle is $\theta - \phi$.