Bend radius from coordinates section
Show older comments
Dear Matlab Central,
I am going to try my best to explain the situation and what I want to achieve.
Currently I'm designing a dynamic vehicle simulation in matlab/simulink. For this simulation I'm provided with a set of x and y coordinates with time steps of 1 second. Now, for this simulation I want to find, real time, the corner radius that the vehicle is making during one drive cycle. So if the recorded vehicle is going in a straight line I want it to be zero and when, calculated out of the coordinates, the vehicle is in a corner I want to find that radius.
I am not sure how I can calculate this in simulink and I was wondering if any of you have had any experience in this or have a suggestion of what to try. I have been digging through some literature but I haven't found anything that fits my needs.
Thanks in advance! Kind regards, Michel.
PS. I will attach an m-file with the x and y coordinates. For every new coordinate (in X & Y) we are one second further down the drive cycle
3 Comments
Eng. Fredius Magige
on 22 Oct 2015
Hi It might be better to have a certain range for practical application such as 0-5; 5.01-30; 30.01-60; 60.01-90 etc otherwise you ll endup with many corners. Otherwise three consecutive coordinates have high capability/chance to generate any corner/corners
Image Analyst
on 22 Oct 2015
Isn't the radius of curvature of a straight line infinity, not zero?
Michel de Jongh
on 23 Oct 2015
Accepted Answer
More Answers (1)
Image Analyst
on 23 Oct 2015
0 votes
Take a section of your curve coordinates (like, say, 9 to 21 points or so), and then use the FAQ to fit them to a circle. http://matlab.wikia.com/wiki/FAQ#How_can_I_fit_a_circle_to_a_set_of_XY_data.3F and get the radius.
Categories
Find more on Mapping Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!