Main MRPT website > C++ reference for 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 64 of file CAtan2LookUpTable.h.

#include <mrpt/math/CAtan2LookUpTable.h>

Public Member Functions

 CAtan2LookUpTableMultiRes () noexcept
 
 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]

CAtan2LookUpTableMultiRes::CAtan2LookUpTableMultiRes ( )
noexcept

Definition at line 67 of file CAtan2LookUpTable.cpp.

◆ CAtan2LookUpTableMultiRes() [2/2]

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

See CAtan2LookUpTableMultiRes for a discussion of the parameters.

Definition at line 68 of file CAtan2LookUpTable.cpp.

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 106 of file CAtan2LookUpTable.cpp.

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

◆ resize()

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

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 82 of file CAtan2LookUpTable.h.

mrpt::math::CAtan2LookUpTableMultiRes
Like CAtan2LookUpTable but with a multiresolution grid for increasingly better accuracy in points nea...
Definition: CAtan2LookUpTable.h:64
mrpt::math::CAtan2LookUpTableMultiRes::resize
void resize(const std::map< double, double > &lst_resolutions2extensions) noexcept
See CAtan2LookUpTableMultiRes for a discussion of the parameters.
Definition: CAtan2LookUpTable.cpp:73



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST