1

In the image below, how can I calculate new point coordinate and direction which are marked in red text. The distance=$1$, radius=$2$ and angle=$30$ degrees. I tried to use the formula $r\sin\theta$ and $r\cos\theta$ but the answer does not match. The answer should be for the new coordinates: $(0.24, 0.96)$ and the direction should be $28.65$ degrees. Please help me to find out how can I do it.

enter image description here

K.Malu
  • 11
  • Welcome to MSE. It will be more likely that you will get an answer if you show us that you made an effort. This should be added to the question rather than in the comments. – José Carlos Santos Sep 21 '18 at 08:57
  • I think i already gave a little idea that i tried rsinθ and rcosθ formula for calculating new point coordinates but i am unable to find any formula to find new direction in degree.In both cases my result is wrong – K.Malu Sep 21 '18 at 09:07
  • How is the angle $30^{\circ}$? It should $\frac 12$ radians$\neq 30^{\circ}$ – For the love of maths Sep 21 '18 at 09:17
  • @MohammadZuhairKhan the steering angle is 30 degree. Turn radius for that steering angle is 2 which is also the radius of the circle. How are you saying the angle is 1/2 radians? I did not understand. – K.Malu Sep 21 '18 at 10:26
  • Your definition of axes is not clear. If you want $\theta=0$ for $(x,y)=(0,0)$ then your circle has equations $y=r\sin\theta$ and $x=r(1-\cos\theta)$. Your direction (as drawn on graph) is exactly $\theta$, so you have to solve for it, given $x,y$. – N74 Sep 21 '18 at 11:03
  • I have to calculate (x.y) position relative to starting position (0,0) and new direction 0 <=new direction <360 – K.Malu Sep 21 '18 at 11:12
  • I thought you said that the arc length is $1$? If it is $1$ then the angle is $\frac 12$ radians. Otherwise I apologise for wasting your time. – For the love of maths Sep 21 '18 at 15:51
  • Judging by the visible part of the clipped compass rosette at the upper left, a bearing of $0$ degrees is “north,” i.e., in the direction of the positive $y$-axis. What’s not apparent is in which direction do angles increase: clockwise or counterclockwise? – amd Sep 21 '18 at 19:43

1 Answers1

1

You’re missing some crucial information here, but it should be possible to reverse-engineer what you mean from the expected result that you’ve given in your question.

First, we need to agree on how bearing (travel direction) is measured, since it doesn’t appear to follow the usual mathematical convention of a zero angle meaning the positive $x$-direction (right or east) and increasing angles going counterclockwise. Here, the fragment of the compass rosette in your illustration suggests that 0° is in the direction of the positive $y$-axis (up or north) and from the expected results, angles increase clockwise.

Next, you need to compute the angle of arc $\Delta\theta$ subtended by the rover’s path. Importantly, this is not the steering angle, which evidently only determines the turn radius. Denoting the distance traveled by $d$, the angle in radians is simply $d/r$. This angle also represents the change in the rover’s heading. Here, $d=1$ and $r=2$, so $\Delta\theta = 1/2$, which is approximately 28.65°. This angle is also equal to the change in heading, and the rover is making a right turn, so the final heading is approximately 28.65° in agreement with your expected results.

With the correct angle in hand, you can then compute the new location. Since the rover starts at $(0,0)$ heading north and is making a right turn, its path ends at $(2-2\cos{\Delta\theta}, 2\sin{\Delta\theta}) \approx (0.24,0.96)$, as expected.

More generally, if the rover starts at point $P_0 = (x_0,y_0)$, its new location is $$\begin{align} \begin{bmatrix}x\\y\end{bmatrix} &= C+\begin{bmatrix}\cos{\Delta\theta}&\sin{\Delta\theta}\\-\sin{\Delta\theta}&\cos{\Delta\theta}\end{bmatrix}(P_0-C) \\ &= \begin{bmatrix}x_c+(x_0-x_c)\cos{\Delta\theta}+(y_0-y_c)\sin{\Delta\theta} \\ y_c - (x_0-x_c)\sin{\Delta\theta}+(y_0-y_c)\cos{\Delta\theta}\end{bmatrix},\end{align}$$ where $\Delta\theta = d/r$ for a right turn and $-d/r$ for a left turn, and $C=(x_c,y_c)$ is the center of the turn. If the initial heading is $\alpha$, then the new heading is, of course, $\alpha+\Delta\theta$.

The center $C$ lies at a distance $r$ from $P$ in a direction perpendicular to the rover’s current facing: $$x_c = x_0 \pm r\cos\alpha \\ y_c = y_0 \mp r\sin\alpha$$ with the signs chosen based on whether it is a right or left turn, respectively.

amd
  • 53,693