Skip to content

reftrack_functions

calc_refline_normvecs(refline)

Documentation This function calculates the normal vectors of the reference line at each coordinate (pointing towards the right in the direction of driving).

Input :param refline: reference line [x_m, y_m]

Output :return refline_normvecs reference line normal vectors [x_m, y_m]

calc_trackboundaries(reftrack)

Documentation This function calculates the actual coordinates of both track boundaries specified by the reference line and the corresponding trackwidths.

Input :param reftrack: reference track [x_m, y_m, trackwidth_right_m, trackwidth_left_m]

Output :return track_boundary_right x-,y-coordinates of right trackboundary (from reference line in driving direction) :return track_boundary_left x-,y-coordinates of left trackboundary (from reference line in driving direction)

check_isclosed_refline(refline)

Documentation This function checks whether the given reference line is a closed or open circuit.

Input :param refline: reference line [x_m, y_m]

Output :return bool_isclosed_refline boolean indicating whether the track is closed / a circuit (=True) or not (=False)

load_reftrack(path2track)

Documentation This function loads the track file.

Input :param path2track: absolute path to reference track file

Output :return reftrack reference track containing x-,y-coordinates and trackwidths to the right and left of the reference line [x_m, y_m, trackwidth_right_m, trackwidth_left_m]

plot_refline(reftrack)

Documentation This function plots the reference line and its normal vectors at each coordinate.

Input :param reftrack: reference track [x_m, y_m, trackwidth_right_m, trackwidth_left_m]

Output