• Welcome to PiBoSo Official Forum. Please login or sign up.
 
March 29, 2024, 04:02:13 PM

News:

World Racing Series beta14 available! :)


Track - MATLAB

Started by gaga_dreher, April 13, 2021, 11:56:40 PM

Previous topic - Next topic

gaga_dreher

Hi folks,

I would like to plot the track using matlab. Can anyone gimme an idea how to do it?

Thanks

HornetMaX

Each track comes with a .tcl (centerline) file: it's text and contains the description of the segments (straights, arcs). Some info from the output plugin sample file:

/******************************************************************************
structures and functions to receive the track center line
******************************************************************************/

typedef struct
{
 int m_iType; /* 0 = straight; 1 = curve */
 float m_fLength; /* meters */
 float m_fRadius; /* curve radius in meters. < 0 for left curves; 0 for straights */
 float m_fAngle; /* start angle in degrees. 0 = north */
 float m_afStart[2]; /* start position in meters */
 float m_fHeight; /* start height in meters */
} SPluginsTrackSegment_t;

gaga_dreher

Quote from: HornetMaX on April 14, 2021, 09:53:09 AMEach track comes with a .tcl (centerline) file: it's text and contains the description of the segments (straights, arcs). Some info from the output plugin sample file:

/******************************************************************************
structures and functions to receive the track center line
******************************************************************************/

typedef struct
{
 int m_iType; /* 0 = straight; 1 = curve */
 float m_fLength; /* meters */
 float m_fRadius; /* curve radius in meters. < 0 for left curves; 0 for straights */
 float m_fAngle; /* start angle in degrees. 0 = north */
 float m_afStart[2]; /* start position in meters */
 float m_fHeight; /* start height in meters */
} SPluginsTrackSegment_t;


Thank you !! 🤝