MRPT  1.9.9
List of all members | Public Member Functions | Private Attributes
mrpt::math::CAtan2LookUpTableMultiRes Class Reference

Detailed Description

Like CAtan2LookUpTable but with a multiresolution grid for increasingly better accuracy in points nearer to the origin.

Example of usage:

std::map<double,double> res2extension;
res2extension[0.001] = 0.5; // 0.1 cm resolution up to 0.5 m
res2extension[0.01] = 1.0; // 1 cm resolution up to 1 m
res2extension[0.02] = 3.0; // 2 cm resolution up to 3 m
res2extension[0.05] = 7.5; // 5 cm resolution up to 7.5 m
res2extension[0.10] = 12.0; // 10 cm resolution up to 12 m
atan2lut.resize(res2extension);

Definition at line 82 of file CAtan2LookUpTable.h.

#include <mrpt/math/CAtan2LookUpTable.h>

Public Member Functions

 CAtan2LookUpTableMultiRes ()=default
 
 CAtan2LookUpTableMultiRes (const std::map< double, double > &lst_resolutions2extensions) noexcept
 See CAtan2LookUpTableMultiRes for a discussion of the parameters. More...
 
void resize (const std::map< double, double > &lst_resolutions2extensions) noexcept
 See CAtan2LookUpTableMultiRes for a discussion of the parameters. More...
 
bool atan2 (double y, double x, double &out_atan2) const noexcept
 Returns the precomputed value for atan2(y,x). More...
 

Private Attributes

std::map< double, mrpt::containers::CDynamicGrid< double > > m_grids
 Maps from maximum (X,Y) coordinates to LUT for [-L,L]x[-L,L] square area. More...
 

Constructor & Destructor Documentation

◆ CAtan2LookUpTableMultiRes() [1/2]

mrpt::math::CAtan2LookUpTableMultiRes::CAtan2LookUpTableMultiRes ( )
default

◆ CAtan2LookUpTableMultiRes() [2/2]

CAtan2LookUpTableMultiRes::CAtan2LookUpTableMultiRes ( const std::map< double, double > &  lst_resolutions2extensions)
noexcept

See CAtan2LookUpTableMultiRes for a discussion of the parameters.

Definition at line 58 of file CAtan2LookUpTable.cpp.

References resize().

Here is the call graph for this function:

Member Function Documentation

◆ atan2()

bool CAtan2LookUpTableMultiRes::atan2 ( double  y,
double  x,
double &  out_atan2 
) const
noexcept

Returns the precomputed value for atan2(y,x).

Returns
false if out of grid bounds.

Definition at line 96 of file CAtan2LookUpTable.cpp.

References mrpt::containers::CDynamicGrid< T >::cellByPos().

Here is the call graph for this function:

◆ resize()

void CAtan2LookUpTableMultiRes::resize ( const std::map< double, double > &  lst_resolutions2extensions)
noexcept

See CAtan2LookUpTableMultiRes for a discussion of the parameters.

Definition at line 63 of file CAtan2LookUpTable.cpp.

References mrpt::containers::CDynamicGrid< T >::cellByIndex(), mrpt::containers::CDynamicGrid< T >::getSizeX(), mrpt::containers::CDynamicGrid< T >::getSizeY(), mrpt::containers::CDynamicGrid< T >::idx2x(), and mrpt::containers::CDynamicGrid< T >::idx2y().

Referenced by TEST().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_grids

std::map<double, mrpt::containers::CDynamicGrid<double> > mrpt::math::CAtan2LookUpTableMultiRes::m_grids
private

Maps from maximum (X,Y) coordinates to LUT for [-L,L]x[-L,L] square area.

Definition at line 100 of file CAtan2LookUpTable.h.




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: c7a3bec24 Sun Mar 29 18:33:13 2020 +0200 at dom mar 29 18:50:38 CEST 2020