Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
grid_geometry.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cmath>
4
12 double angle; // Angular resolution (°)
13 double radius; // Base radial bin size (m)
14 double start_augmentation; // Distance at which augmentation starts
15 double radius_augmentation; // Bin size increase per bin (m)
16 double fov; // Field of view (°)
17
27 GridGeometry(double angle_, double radius_, double start_aug_, double radius_aug_, double fov_);
28
35 int get_slice_index(double x, double y) const;
36
43 int get_bin_index(double x, double y) const;
44
48 int get_num_slices() const;
49
55 int get_num_bins(double range) const;
56};
Structure to hold grid geometry parameters and provide utility functions.
double radius_augmentation
int get_bin_index(double x, double y) const
Compute bin index for a given (x, y)
int get_slice_index(double x, double y) const
Compute slice index for a given (x, y)
double start_augmentation
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.