Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
pathTool.hpp
Go to the documentation of this file.
00001 
00012 #ifndef REDNAV_LIBS_PATH_TOOL_HPP
00013 #define REDNAV_LIBS_PATH_TOOL_HPP
00014 
00015 // For the definition of jafar::lgl::NavPath
00016 #include <lgl/NavGraph.hpp>
00017 #include <lgl/Attributes.hpp>
00018 
00019 
00020 namespace jafar {
00021 namespace rednav {
00022 
00023   typedef enum { 
00024     PATH_TWO_POINTS=1,
00025     PATH_THREE_POINTS,
00026     PATH_FOUR_POINTS,
00027     PATH_COMMON_FILTER,   // Apply subsampling and max number of points
00028     PATH_RDV_CROP,
00029     PATH_TWO_POINTS_LIMIT,
00030     PATH_DISTANCE_LIMIT,
00031     PATH_INTERPOLATION,
00032     PATH_SAFESAMPLING,
00033     PATH_SMARTSAMPLING
00034   } PATH_TRANSFORMATION;
00035 
00036   class PathTool {
00037     private:
00038     //{{{
00045       double subsampler;
00046 
00054       int maxwaypts;
00055 
00057       double pathMaxEntropy;
00058 
00060       double pathMaxProba;
00061 
00063       double cellScale;
00064 
00066       double geoXRoot;
00067 
00069       double geoYRoot;
00070 
00072       double pathMaxDistance;
00073 
00075       double pathMaxStepDistance;
00076 
00078       double pathMaxDevDistance;
00079 
00081       double sensorRadius;
00082 
00086       int interpolationStartPointIdx;
00087 
00091       int interpolationStopPointIdx;
00092 
00094       double interpolationDistance;
00095 
00097       jafar::lgl::NavGraph* navgraph;
00098     //}}}
00099 
00100     public:
00101     //{{{
00103       PathTool();
00104 
00106       PathTool(jafar::lgl::NavPath&, PATH_TRANSFORMATION, jafar::lgl::NavGraph* ng_=NULL);
00107 
00109       ~PathTool();
00110 
00121       bool applyTool(const jafar::lgl::NavPath& src, jafar::lgl::NavPath& out, PATH_TRANSFORMATION patid);
00122 
00124       bool twoPoints(const jafar::lgl::NavPath& src, jafar::lgl::NavPath& out);
00125 
00127       bool subSample(const jafar::lgl::NavPath& src, jafar::lgl::NavPath& out, double subsamp);
00128 
00135       bool cropPath(double vent, double vproba, jafar::lgl::NavPath& navpath);
00136 
00138       bool cropPath(const jafar::lgl::NavPath& srcPath, jafar::lgl::NavPath& outPath);
00139 
00148       bool twoPointsFromCurve(const jafar::lgl::NavPath& src, jafar::lgl::NavPath& out);
00149 
00152       bool cropDistance(const jafar::lgl::NavPath& src, jafar::lgl::NavPath& out, double cropDistance);
00153 
00163       bool pathInterpolation(const jafar::lgl::NavPath& src, jafar::lgl::NavPath& out, double smallestInterval, int masterP1, int masterP2);
00164 
00171       bool pathSafeSampling(const jafar::lgl::NavPath& src, jafar::lgl::NavPath& out);
00172 
00178       bool pathSmartSampling(const jafar::lgl::NavPath& src, jafar::lgl::NavPath& out);
00179 
00180       //-----------------------------------------------------/
00181 
00187       double navLocToMeters(int a);
00188 
00190       double navLocDistance(const jafar::lgl::NavLocation& A, const jafar::lgl::NavLocation& B);
00191 
00193       double shortestAxisDistance(const jafar::lgl::NavLocation& A, const jafar::lgl::NavLocation& B);
00194 
00196       double getOrthogonalHeight(const jafar::lgl::NavLocation& A, const jafar::lgl::NavLocation& B, const jafar::lgl::NavLocation& C);
00197 
00204       bool surroundingsDanger(const jafar::lgl::NavLocation& A, float& fodist);
00205 
00206       //-----------------------------------------------------/
00207       //--- set stuffs 
00208 
00210       void setMaxWayPts(int n);
00211 
00216       void setPathMaxEntropy(double pme);
00217 
00222       void setPathMaxProba(double pmp);
00223 
00228       void setScale(double cellres);
00229 
00231       void setGeoXRoot(double gxroot);
00232 
00234       void setGeoYRoot(double gyroot);
00235 
00237       void setSubSampler(double setsb);
00238 
00243       void setPathMaxDistance(double pmd);
00244 
00249       void setPathMaxStepDistance(double pmd);
00250 
00255       void setPathMaxDevDistance(double pmd);
00256 
00260       void setSensorRadius(double ssd);
00261       
00265       void setInterpolationStartPointIdx(int);
00266 
00270       void setInterpolationStopPointIdx(int);
00271 
00275       void setInterpolationDistance(double);
00276 
00277 
00279       void setNavGraph(jafar::lgl::NavGraph* ng);
00280 
00281       //-----------------------------------------------------/
00282       //--- get stuffs 
00283 
00285       double getPathMaxEntropy();
00286 
00288       double getPathMaxProba();
00289 
00291       double getSubSampler();
00292 
00296       double getPathMaxDistance();
00297 
00301       double getPathMaxStepDistance();
00302 
00306       double getPathMaxDevDistance();
00307 
00311       double getSensorRadius();
00312 
00314       double getScale();
00315 
00317       double getGeoXRoot();
00318 
00320       double getGeoYRoot();
00321 
00323       int getInterpolationStartPointIdx();
00324 
00326       int getInterpolationStopPointIdx();
00327     //}}}
00328 
00329   };
00330 }} // end of namespaces
00331 
00332 #endif //REDNAV_LIBS_PATH_TOOL_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:26 for Jafar by doxygen 1.7.6.1
LAAS-CNRS