]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/navradio.hxx
GPS data validity clean-up; it was a mess, now it's more robust. Thanks to Dave Luff...
[flightgear.git] / src / Instrumentation / navradio.hxx
index 222a7206d1233dcb12dde923dfbc5d65fbe73cce..0619962c044b1079aff66a19f5b1170fd7ef8c17 100644 (file)
@@ -113,7 +113,10 @@ class FGNavRadio : public SGSubsystem
     SGPropertyNode_ptr gps_to_flag_node;
     SGPropertyNode_ptr gps_from_flag_node;
     SGPropertyNode_ptr gps_has_gs_node;
-
+    SGPropertyNode_ptr gps_course_node;
+    SGPropertyNode_ptr gps_xtrack_error_nm_node;
+    SGPropertyNode_ptr _magvarNode;
+    
     // internal (private) values
 
     int play_count;
@@ -126,7 +129,6 @@ class FGNavRadio : public SGSubsystem
 
     bool has_dme;
     double target_radial;
-    SGVec3d gs_base_vec;
     SGTimeStamp prev_time;
     SGTimeStamp curr_time;
     double effective_range;
@@ -136,13 +138,16 @@ class FGNavRadio : public SGSubsystem
     double last_x;
     double last_loc_dist;
     double last_xtrack_error;
-
+    double _localizerWidth; // cached localizer width in degrees
+    
     string _name;
     int _num;
 
     // internal periodic station search timer
     double _time_before_search_sec;
 
+    SGVec3d _gsCart, _gsAxis, _gsVertical;
+
     // CDI properties
     bool _toFlag, _fromFlag;
     double _cdiDeflection;
@@ -170,6 +175,11 @@ class FGNavRadio : public SGSubsystem
     
     void clearOutputs();
 
+    /**
+     * Compute the localizer width in degrees - see implementation for 
+     * more information on the relevant standards and formulae.
+     */
+    double localizerWidth(FGNavRecord* aLOC);
     FGNavRecord* findPrimaryNavaid(const SGGeod& aPos, double aFreqMHz);
 public: