]> git.mxchange.org Git - flightgear.git/commitdiff
NavData: can refresh some in-place.
authorJames Turner <zakalawe@mac.com>
Thu, 21 Nov 2013 17:39:05 +0000 (17:39 +0000)
committerJames Turner <zakalawe@mac.com>
Fri, 22 Nov 2013 22:52:33 +0000 (22:52 +0000)
(Hacking to support faster scenery-path switching)

src/Airports/runways.cxx
src/Airports/runways.hxx
src/Navaids/navrecord.cxx
src/Navaids/navrecord.hxx

index 84205a27620a9de91f27cf0e6c69170aa31d6bc7..4dc8660767be7d0dc745f8a72af91148385c356f 100644 (file)
@@ -204,6 +204,16 @@ FGRunway::getApproaches(flightgear::ProcedureType type) const
   return result;
 }
 
+void FGRunway::updateThreshold(const SGGeod& newThreshold, double newHeading,
+                     double newDisplacedThreshold,
+                     double newStopway)
+{
+    modifyPosition(newThreshold);
+    _heading = newHeading;
+    _stopway = newStopway;
+    _displ_thresh = newDisplacedThreshold;
+}
+
 FGHelipad::FGHelipad(PositionedID aGuid,
                         PositionedID aAirport, const string& aIdent,
                         const SGGeod& aGeod,
index 03434ab8efff2a6c629f9b6c0d35e2872614e095..ae440475359793e4090e30a89179dbd110fbcf76 100644 (file)
@@ -117,6 +117,10 @@ public:
     flightgear::ProcedureType type = flightgear::PROCEDURE_INVALID
   ) const;
   
+  void updateThreshold(const SGGeod& newThreshold,
+                       double newHeading,
+                       double newDisplacedThreshold,
+                       double newStopway);
 };
 
 class FGHelipad : public FGRunwayBase
index 8700a577f5ec1bab04dcac85d3944d815b130749..cb83fd02d189fbdb3794f8637ce338fdb152523a 100644 (file)
@@ -103,6 +103,12 @@ void FGNavRecord::setColocatedDME(PositionedID other)
   mColocated = other;
 }
 
+void FGNavRecord::updateFromXML(const SGGeod& geod, double heading)
+{
+    modifyPosition(geod);
+    multiuse = heading;
+}
+
 FGTACANRecord::FGTACANRecord(void) :
     channel(""),
     freq(0)
index e4f28c5f8598ad71555f1d92399d4aa6a662d937..a96e171d85b1398a0135efac02f80886ba69d10c 100644 (file)
@@ -49,7 +49,6 @@ class FGNavRecord : public FGPositioned
     PositionedID mColocated;     // Colocated DME at a navaid (ILS, VOR, TACAN, NDB)
     bool serviceable;          // for failure modeling
 
-  void processSceneryILS(SGPropertyNode* aILSNode);
 public:
   FGNavRecord(PositionedID aGuid, Type type, const std::string& ident,
               const std::string& name,
@@ -90,6 +89,8 @@ public:
 
   void setColocatedDME(PositionedID other);
   bool hasDME();
+    
+    void updateFromXML(const SGGeod& geod, double heading);
 };
 
 class FGTACANRecord : public SGReferenced {