X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FNavaids%2FroutePath.hxx;h=49b44de4a01d2b3db0285700b765980c6eac86b8;hb=56d7d049bc0b7361d1799298c38e61084f5d5e3f;hp=421dd98205cbc63a8eb5feeb3216e976c98ef46c;hpb=7317aff22d393a5aaef6b5e84571fb86a465c002;p=flightgear.git diff --git a/src/Navaids/routePath.hxx b/src/Navaids/routePath.hxx index 421dd9820..49b44de4a 100644 --- a/src/Navaids/routePath.hxx +++ b/src/Navaids/routePath.hxx @@ -24,6 +24,7 @@ #ifndef FG_ROUTE_PATH_HXX #define FG_ROUTE_PATH_HXX +#include #include namespace flightgear @@ -37,18 +38,21 @@ typedef std::vector SGGeodVec; class RoutePath { public: - RoutePath(const flightgear::WayptVec& wpts); RoutePath(const flightgear::FlightPlan* fp); - + ~RoutePath(); + SGGeodVec pathForIndex(int index) const; SGGeod positionForIndex(int index) const; - + + SGGeod positionForDistanceFrom(int index, double distanceM) const; + double trackForIndex(int index) const; double distanceForIndex(int index) const; double distanceBetweenIndices(int from, int to) const; + private: class RoutePathPrivate; @@ -62,10 +66,7 @@ private: void interpolateGreatCircle(const SGGeod& aFrom, const SGGeod& aTo, SGGeodVec& r) const; - RoutePathPrivate* d; - - - double _pathTurnRate; ///< degrees-per-second, defaults to 3, i.e 180 in a minute + std::auto_ptr d; }; #endif