Filter löschen
Filter löschen

Bend radius from coordinates section

12 Ansichten (letzte 30 Tage)
Michel de Jongh
Michel de Jongh am 22 Okt. 2015
Bearbeitet: cn1992 am 29 Mär. 2019
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 Kommentare
Image Analyst
Image Analyst am 22 Okt. 2015
Isn't the radius of curvature of a straight line infinity, not zero?
Michel de Jongh
Michel de Jongh am 23 Okt. 2015
Hi Fredius, your absolutly right. That would make it more practical. Thanks.
Hi Image Analyst, that is true. I didn't thought of that.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Mohammad Abouali
Mohammad Abouali am 22 Okt. 2015
You are looking to calculate Curvature. Here is the link with formula for you to calculate it:
https://en.wikipedia.org/wiki/Curvature
When it is straight line, the Radius is infinity, thus th curvature is zero.
  5 Kommentare
Mohammad Abouali
Mohammad Abouali am 28 Okt. 2015
Bearbeitet: Mohammad Abouali am 28 Okt. 2015
That's not a regular function of MATLAB. It is provided from the MATLAB File Exchange.
Get that and see if that works.
Also you need to append your code that you provided earlier (Coordinates_Problem_Example.m) and include the Latitude and Longitude definition from your code at the beginning of the code snippet that I provided. They had lots of number and I couldn't fit it here. So I did not wrote it in that code. And that's what MATLAB is complaining. If you run that code, it comes to line 3 and then there is not Latitude/Longitude variable defined so it produces that error.
cn1992
cn1992 am 29 Mär. 2019
Bearbeitet: cn1992 am 29 Mär. 2019
Hello Mr Abouali,
Could you please post equations related to deg2utm code. I would like to understand the equations
Thanks in advance.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Image Analyst
Image Analyst am 23 Okt. 2015
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.

Kategorien

Mehr zu Vehicle Scenarios finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by