]> git.mxchange.org Git - flightgear.git/blobdiff - src/Autopilot/route_mgr.hxx
Move viewer-related sources to separate folder.
[flightgear.git] / src / Autopilot / route_mgr.hxx
index 31336f96ad56181a2b9b7af820753865a7726701..b0f14ba79da47f795f5720e9eb6cd838c4d41f6d 100644 (file)
@@ -35,6 +35,8 @@ class SGPath;
 class PropertyWatcher;
 
 class FGAirport;
+class FGRunway;
+
 typedef SGSharedPtr<FGAirport> FGAirportRef;
 
 /**
@@ -92,6 +94,8 @@ public:
     
   flightgear::Waypt* wayptAtIndex(int index) const;
              
+  SGPropertyNode_ptr wayptNodeAtIndex(int index) const;
+             
   /**
    * Find a waypoint in the route, by position, and return its index, or
    * -1 if no matching waypoint was found in the route.
@@ -134,6 +138,12 @@ public:
      *  - navaid/radial-deg/offset-nm
      */
     flightgear::WayptRef waypointFromString(const std::string& target);
+    
+    FGAirportRef departureAirport() const;
+    FGAirportRef destinationAirport() const;
+    
+    FGRunway* departureRunway() const;
+    FGRunway* destinationRunway() const;
 private:
   flightgear::WayptVec _route;
   int _currentIndex;
@@ -156,6 +166,7 @@ private:
     SGPropertyNode_ptr cruise; ///< cruise information
     
     SGPropertyNode_ptr totalDistance;
+    SGPropertyNode_ptr distanceToGo;
     SGPropertyNode_ptr ete;
     SGPropertyNode_ptr elapsedFlightTime;
     
@@ -185,6 +196,12 @@ private:
     
     void setETAPropertyFromDistance(SGPropertyNode_ptr aProp, double aDistance);
     
+    /**
+     * retrieve the cached path distance along a leg
+     */
+    double cachedLegPathDistanceM(int index) const;
+    double cachedWaypointPathTotalDistance(int index) const;
+  
     class InputListener : public SGPropertyChangeListener {
     public:
         InputListener(FGRouteMgr *m) : mgr(m) {}