00001 #ifndef INCLUDE_NAVLIB_HKSOLVER
00002 #define INCLUDE_NAVLIB_HKSOLVER
00003
00004 #include "tpbvpSolver.h"
00005
00006 namespace navlib
00007 {
00009 class HKPath : public Path
00010 {
00011 friend class HKSolver;
00012
00013 public:
00014 HKPath() : _a(0.0), _b(0.0), _c(0.0), _d(1.0) {}
00016 HKPath(const PathPoint& wp0, double a, double b, double c, double d);
00017 virtual ~HKPath() {}
00018 Path* copy();
00020 double getA() const;
00022 double getB() const;
00024 double getC() const;
00025 double getLength() const;
00026 PathPoint getPathPoint(double d) const;
00027 std::vector<PathPoint> getPathPoints(unsigned int n=0) const;
00029 unsigned int getWindingNumber();
00031 void read(istream& is);
00033 void write(ostream& os) const;
00034
00035 private:
00036 double _a;
00037 double _b;
00038 double _c;
00039 double _d;
00040 };
00041
00045 class HKSolver : public TpbvpSolver
00046 {
00047 public:
00048 HKSolver(double timeout);
00049 virtual ~HKSolver();
00050 Path* getPath(const PathPoint& wp0, const PathPoint& wpf);
00051
00052 private:
00059 HKPath* getPath(PathPoint wp0, PathPoint wpf, double a, double b, double c);
00060
00061 double _timeout;
00062 };
00063 }
00064
00065 #endif