Calculating circle radius from two points and arc length

8.1k Views Asked by At

For a simulation I want to convert between different kind of set point profiles with one being set points based on steering angles and one being based on circle radius.

I have 2 way points the steering angle the distance driven and now I need to approximate or calculate a circle radius where the arc length equals the distance between the waypoints.

Is this kind of problem solvable or is there no solution but incremental calculations.

Please see the Image i attached as link. I marked the things that I have blue, the things that I need red. Dotted are the things I don't really need.

Image problem explanation

Edit: Partial Solution Image

similar problem

another similar problem

3

There are 3 best solutions below

1
On BEST ANSWER

Ignoring this “steering angle”, you have two relevant quantities: the distance between points, which is equal to the chord length $c$, and the arc length $a$. You're looking for a radius $r$ and an angle $\theta$ such that

\begin{align*} a &= r\theta \\ c &= 2r\sin\frac\theta2 \end{align*}

This results in a transcendental equation for $\theta$:

$$c\theta=2a\sin\frac\theta2$$

I guess that a numeric solution (perhaps some form of gradient descent) is most likely the best option to solve this. I don't know any special function to solve this equation. Once you have $\theta$, you can compute

$$r=\frac a\theta$$

4
On

I found at least one possible solution where the result doesn't got through both waypoints but at least has the correct "distance" arc length. It makes use of versine to get the angle at the center and then the arc length calculation to get a radius which produces one possible solution for the arc length given.

I would appreciate it if maybe a alternate or even better a more accurate solution, that would go through both waypoints is found.

Possible Solution

0
On

You can calculate by taking all the circonference through your two points and then imposing that the tangent at the second point is equal to $\sin(\alpha)$ (depending on how you set your axis) so that you have three costraints on your equation

In my reference (origin on the straight wheel, $y$-axis towards the steering wheel) the result is $$R = \frac{L}{2}\cdot\sqrt{1+\frac{9}{\sin^2(\alpha)}}$$