finding the coordinate of a point using a distance and an angle from given point

3.9k Views Asked by At

sorry for the simple question and please replay with simple terms

I have two points (A, B) where the A is the center of my plot (xA, yA). I know the distance (AB) between the point A and B and the angle (theta) expressed in degrees (°) respect the North (0°) (i.e., measured by a Compass).

I wish to compute the position (xB, yB) of the point B using the point A (xA, yA) as the center of my system.

1

There are 1 best solutions below

3
On

With the distance, you have the hypotenuse of a right triangle. You could then use your angle to find the angle opposite point B, then use sin and cos to get the X and Y distances between A and B. Since you've defined A as the centre of the system, you can translate the X and Y distances directly into coordinates of the appropriate sign. If A wasn't in the centre you'd have the offset that B is from A. With that you can find where it is related to the origin.

I recommend drawing a diagram. It's usually very helpful.

EDIT: Alternate approach.

You could take it as though the line AB were extending from the unit circle by multiplying by your distance. Then you'd have $Y_b - Y_a = |AB|\sin{m}$ and $X_b - X_a = |AB|\cos{m}$. However $m$ here is NOT your angle from north. It's your angle from the X axis, counterclockwise. The angle you have is from the Y axis, going clockwise. To translate

$$(360 - \theta) + 90 = 450 - \theta = m$$

You could mod it by 360 if you want, but calculators will generally accept looping around the circle.