[Math] Calculating travel distance for car with turning radius

geometrytrigonometry

I'm trying to calculate the travel distance for a car that has a turning radius in order to get to a destination.

Here's a picture of what I'm trying to figure out

The information I know is this:

  1. Turning radius of the car(R) – Green lines
  2. Distance to the destination(D) – Black line
  3. Angle to the destination(Theta) – Angle between the black line to the destination and the blue line that is the heading of the car

I also know that the destination is not inside the turning circle of the car.

What I'm trying to find the lengths of A(yellow line) and B(purple arc). I'm just not sure how to calculate them from the information I have. Any suggestions or ideas would be appreciated!

Thanks!

Best Answer

In the figure below the car is at the origin heading down.

enter image description here

Point $j$ is the destination and has coordinates $(x_j, y_j)$. From the triangle $Ojk$ it should be easy to see that $$x_j = D*cos(\theta-\frac{\pi}{2})$$

$$y_j = D*sin(\theta-\frac{\pi}{2})$$

To find the distance $A$ we first find the distance $X$. From triangle $cjk$ we find $$X^2=(x_j-R)^2 + y_j^2$$

From triangle $cji$ we similarly find that $$X^2=A^2+R^2$$

Putting these two together we find $$A=\sqrt{(x_j-R)^2 + y_j^2-R^2}$$

That was $A$, now to find the distance B travelled on the circle. This means finding angle $\alpha3$. But $$\alpha3= \pi - (\alpha1 - \alpha2)$$

where $\alpha1$ is the angle $\angle icj$. These angles are easily found as $$\alpha1=arctan(\frac{A}{R})$$

$$\alpha2=arctan(\frac{y_j}{x_j-R})$$

The distance travelled on the circle is thus $$B=R(\pi-arctan(\frac{A}{R})+arctan(\frac{y_j}{x_j-R}))$$