class mrpt::math::CAtan2LookUpTableMultiRes¶
Like CAtan2LookUpTable but with a multiresolution grid for increasingly better accuracy in points nearer to the origin.
Example of usage:
mrpt::math::CAtan2LookUpTableMultiRes atan2lut; 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);
#include <mrpt/math/CAtan2LookUpTable.h> class CAtan2LookUpTableMultiRes { public: // construction CAtan2LookUpTableMultiRes(); CAtan2LookUpTableMultiRes(const std::map<double, double>& lst_resolutions2extensions); // methods void resize(const std::map<double, double>& lst_resolutions2extensions); bool atan2(double y, double x, double& out_atan2) const; };
Construction¶
CAtan2LookUpTableMultiRes(const std::map<double, double>& lst_resolutions2extensions)
See CAtan2LookUpTableMultiRes for a discussion of the parameters.
Methods¶
void resize(const std::map<double, double>& lst_resolutions2extensions)
See CAtan2LookUpTableMultiRes for a discussion of the parameters.
bool atan2(double y, double x, double& out_atan2) const
Returns the precomputed value for atan2(y,x).
Returns:
false if out of grid bounds.