]> git.mxchange.org Git - flightgear.git/blobdiff - src/Autopilot/route_mgr.hxx
Fix a copy-and-paste bug with destination runways. Caught by Scott Hamilton.
[flightgear.git] / src / Autopilot / route_mgr.hxx
index 8799ce16060d418f663830142e6b2ec67eb5404b..2cc6b42f99882356408f1bab067a5ebbac182c4d 100644 (file)
@@ -44,21 +44,14 @@ private:
     SGRoute* _route;
     time_t _takeoffTime;
     time_t _touchdownTime;
-    bool _autoSequence; // true if we are doing internal sequencing
-      // false if other code (FMS/GPS) is managing sequencing
-    
     // automatic inputs
     SGPropertyNode_ptr lon;
     SGPropertyNode_ptr lat;
     SGPropertyNode_ptr alt;
     SGPropertyNode_ptr magvar;
     
-    // automatic outputs
-    bool _driveAutopilot;
-    SGPropertyNode_ptr _apTargetAltitudeFt;
-    SGPropertyNode_ptr _apAltitudeLock;
-    SGPropertyNode_ptr _apTrueHeading;
-    
+    // automatic outputs    
     SGPropertyNode_ptr departure; ///< departure airport information
     SGPropertyNode_ptr destination; ///< destination airport information
     SGPropertyNode_ptr alternate; ///< alternate airport information
@@ -70,7 +63,6 @@ private:
     
     SGPropertyNode_ptr active;
     SGPropertyNode_ptr airborne;
-    SGPropertyNode_ptr currentWp;
     
     SGPropertyNode_ptr wp0;
     SGPropertyNode_ptr wp1;
@@ -79,6 +71,16 @@ private:
     
     SGPropertyNode_ptr _pathNode;
     
+    /** 
+     * Signal property to notify people that the route was edited
+     */
+    SGPropertyNode_ptr _edited;
+    
+    /**
+     * Signal property to notify when the last waypoint is reached
+     */
+    SGPropertyNode_ptr _finished;
+    
     void setETAPropertyFromDistance(SGPropertyNode_ptr aProp, double aDistance);
     
     class InputListener : public SGPropertyChangeListener {
@@ -94,7 +96,6 @@ private:
     
     InputListener *listener;
     SGPropertyNode_ptr mirror;
-    bool altitude_set;
 
     /**
      * Create a SGWayPoint from a string in the following format:
@@ -107,20 +108,19 @@ private:
     
     
     void update_mirror();
-    bool near_ground();
     
     void currentWaypointChanged();
     
     /**
-     * Helper to update the target_altitude_ft and altitude_set flag when wp0
-     * changes
+     * Parse a route/wp node (from a saved, property-lsit formatted route)
      */
-    void updateTargetAltitude();
+    void parseRouteWaypoint(SGPropertyNode* aWP);
     
     /**
-     * Parse a route/wp node (from a saved, property-lsit formatted route)
+     * Check if we've reached the final waypoint. 
+     * Returns true if we have.
      */
-    void parseRouteWaypoint(SGPropertyNode* aWP);
+    bool checkFinished();
 public:
 
     FGRouteMgr();