Function calculate_matches_for_side
Defined in File functional_cone_matching.hpp
Function Documentation
-
std::tuple<arma::fmat, arma::ivec, arma::fmat> calculate_matches_for_side(const arma::fmat &cones, ConeType cone_type, const arma::fmat &other_side_cones, float major_radius, float minor_radius, float max_search_angle)
Calculates matches between cones on one side of the track and cones on the other side.
This function finds the best match for each cone from one side of the track to the other, based on direction and geometric criteria.
- Parameters:
cones – A matrix of cone positions on the current side of the track (N x 2).
cone_type – The type of cones (either LEFT or RIGHT).
other_side_cones – A matrix of cone positions on the opposite side of the track (M x 2).
major_radius – The major radius of the cones.
minor_radius – The minor radius of the cones.
max_search_angle – The maximum angle allowed when searching for matches.
- Returns:
A tuple containing:
Matchable cone positions (N x 2).
Indices of the best matches (1D array of indices).
Search directions (N x 2).