]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/gps.hxx
Merge branch 'durk/traffic'
[flightgear.git] / src / Instrumentation / gps.hxx
index 15d9a8b148556097a9709ab62d27d2eb2e7fc102..e745418d6c251d5d8022f9abf3a48272b2e88ed2 100644 (file)
@@ -130,7 +130,9 @@ private:
       double minRunwayLengthFt() const
       { return _minRunwayLengthFt; }
       
-      double getOBSCourse() const;
+      double getExternalCourse() const;
+      
+      void setExternalCourse(double aCourseDeg);
       
       bool cdiDeflectionIsAngular() const
       { return (_cdiMaxDeflectionNm <= 0.0); }
@@ -140,6 +142,9 @@ private:
         assert(_cdiMaxDeflectionNm > 0.0);
         return _cdiMaxDeflectionNm;
       }
+      
+      bool driveAutopilot() const
+      { return _driveAutopilot; }
     private:
       bool _enableTurnAnticipation;
       
@@ -162,14 +167,16 @@ private:
       // should we require a hard-surfaced runway when filtering?
       bool _requireHardSurface;
       
-      // helpers to tie obs-course-source property
-      const char* getOBSCourseSource() const;
-      void setOBSCourseSource(const char* aPropPath);
+      // helpers to tie course-source property
+      const char* getCourseSource() const;
+      void setCourseSource(const char* aPropPath);
       
-      // property to retrieve the OBS course from
-      SGPropertyNode_ptr _obsCourseSource;
+      // property to retrieve the external course from
+      SGPropertyNode_ptr _extCourseSource;
       
       double _cdiMaxDeflectionNm;
+      
+      bool _driveAutopilot;
     };
     
     class SearchFilter : public FGPositioned::Filter
@@ -186,7 +193,6 @@ private:
      */
     void clearOutput();
 
-    void updateWithValid(double dt);
     void updateBasicData(double dt);
     void updateWaypoints();
 
@@ -195,9 +201,12 @@ private:
     void referenceNavaidSet(const std::string& aNavaid);
     void tuneNavRadios();
     void updateRouteData();
+    void driveAutopilot();
     
     void routeActivated();
     void routeManagerSequenced();
+    void routeEdited();
+    void routeFinished();
     
     void updateTurn();  
     void updateOverflight();    
@@ -208,8 +217,12 @@ private:
     void computeTurnData();
     void updateTurnData();
     double computeTurnRadiusNm(double aGroundSpeedKts) const;
-    
-
+  
+  /**
+   * Update one-shot things when WP1 / leg data change
+   */
+  void wp1Changed();
+  
 // scratch maintenence utilities
   void setScratchFromPositioned(FGPositioned* aPos, int aIndex);
   void setScratchFromCachedSearchResult();
@@ -245,6 +258,8 @@ private:
   void nextResult();
   void previousResult();
   void defineWaypoint();
+  void insertWaypointAtIndex(int aIndex);
+  void removeWaypointAtIndex(int aIndex);
   
 // tied-property getter/setters
   void setCommand(const char* aCmd);
@@ -288,6 +303,8 @@ private:
   double getWP1CourseDeviation() const;
   double getWP1CourseErrorNm() const;
   bool getWP1ToFlag() const;
+  bool getWP1FromFlag() const;
+  
   // true-bearing-error and mag-bearing-error
   
   
@@ -315,13 +332,14 @@ private:
     SGPropertyNode_ptr _route_current_wp_node;
     SGPropertyNode_ptr _routeDistanceNm;
     SGPropertyNode_ptr _routeETE;
-    
-    SGPropertyNode_ptr _fromFlagNode;
-    
+  SGPropertyNode_ptr _routeEditedSignal;
+  SGPropertyNode_ptr _routeFinishedSignal;
+
     double _selectedCourse;
     
-    bool _last_valid;
+    bool _dataValid;
     SGGeod _last_pos;
+    bool _lastPosValid;
     double _last_speed_kts;
     double _last_true_track;
     double _last_vertical_speed;
@@ -372,6 +390,13 @@ private:
     double _turnRadius; // radius of turn in nm
     SGGeod _turnPt;
     SGGeod _turnCentre;
+  
+  SGPropertyNode_ptr _realismSimpleGps; ///< should the GPS be simple or realistic?
+  
+// autopilot drive properties
+  SGPropertyNode_ptr _apTrueHeading;
+  SGPropertyNode_ptr _apTargetAltitudeFt;
+  SGPropertyNode_ptr _apAltitudeLock;
 };