Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
GridGeometry Struct Reference

Structure to hold grid geometry parameters and provide utility functions. More...

#include <grid_geometry.hpp>

Collaboration diagram for GridGeometry:
Collaboration graph

Public Member Functions

 GridGeometry (double angle_, double radius_, double start_aug_, double radius_aug_, double fov_)
 Constructor to initialize grid geometry parameters.
 
int get_slice_index (double x, double y) const
 Compute slice index for a given (x, y)
 
int get_bin_index (double x, double y) const
 Compute bin index for a given (x, y)
 
int get_num_slices () const
 Get the number of slices in the grid.
 
int get_num_bins (double range) const
 Get the number of bins for a given range.
 

Public Attributes

double angle
 
double radius
 
double start_augmentation
 
double radius_augmentation
 
double fov
 

Detailed Description

Structure to hold grid geometry parameters and provide utility functions.

Definition at line 11 of file grid_geometry.hpp.

Constructor & Destructor Documentation

◆ GridGeometry()

GridGeometry::GridGeometry ( double  angle_,
double  radius_,
double  start_aug_,
double  radius_aug_,
double  fov_ 
)

Constructor to initialize grid geometry parameters.

Parameters
angle_Angular resolution
radius_Base radial bin size
start_aug_Distance at which augmentation starts
radius_aug_Bin size increase per bin
fov_Field of view

Definition at line 3 of file grid_geometry.cpp.

Member Function Documentation

◆ get_bin_index()

int GridGeometry::get_bin_index ( double  x,
double  y 
) const

Compute bin index for a given (x, y)

Parameters
xX coordinate
yY coordinate
Returns
Bin index

Definition at line 22 of file grid_geometry.cpp.

Here is the caller graph for this function:

◆ get_num_bins()

int GridGeometry::get_num_bins ( double  range) const

Get the number of bins for a given range.

Parameters
rangeDistance from origin
Returns
Number of bins

Definition at line 45 of file grid_geometry.cpp.

Here is the caller graph for this function:

◆ get_num_slices()

int GridGeometry::get_num_slices ( ) const

Get the number of slices in the grid.

Definition at line 41 of file grid_geometry.cpp.

Here is the caller graph for this function:

◆ get_slice_index()

int GridGeometry::get_slice_index ( double  x,
double  y 
) const

Compute slice index for a given (x, y)

Parameters
xX coordinate
yY coordinate
Returns
Slice index

Definition at line 11 of file grid_geometry.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ angle

double GridGeometry::angle

Definition at line 12 of file grid_geometry.hpp.

◆ fov

double GridGeometry::fov

Definition at line 16 of file grid_geometry.hpp.

◆ radius

double GridGeometry::radius

Definition at line 13 of file grid_geometry.hpp.

◆ radius_augmentation

double GridGeometry::radius_augmentation

Definition at line 15 of file grid_geometry.hpp.

◆ start_augmentation

double GridGeometry::start_augmentation

Definition at line 14 of file grid_geometry.hpp.


The documentation for this struct was generated from the following files: