]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/simple.hxx
Prepare and implement reinit methods for instruments
[flightgear.git] / src / Airports / simple.hxx
index 1eea8d8ec1c53faa74d2e8e676162df4e1232131..dfa83657057a8d0bc1da7cb7c07f8c44e7f6b4a8 100644 (file)
@@ -50,10 +50,12 @@ namespace flightgear {
   class STAR;
   class Approach;
   class Waypt;
-
+  class CommStation;
 
   typedef SGSharedPtr<Waypt> WayptRef;
   typedef std::vector<WayptRef> WayptVec;
+  
+  typedef std::vector<CommStation*> CommStationList;
 }
 
 
@@ -80,6 +82,8 @@ public:
     bool   isSeaport()    const;
     bool   isHeliport()   const;
 
+    static bool isAirportType(FGPositioned* pos);
+    
     virtual const std::string& name() const
     { return _name; }
 
@@ -157,7 +161,7 @@ public:
      class HardSurfaceFilter : public AirportFilter
      {
      public:
-       HardSurfaceFilter(double minLengthFt);
+       HardSurfaceFilter(double minLengthFt = -1);
        
        virtual bool passAirport(FGAirport* aApt) const;
        
@@ -184,7 +188,8 @@ public:
       
       unsigned int numApproaches() const;
       flightgear::Approach* getApproachByIndex(unsigned int aIndex) const;
-
+      flightgear::Approach* findApproachWithIdent(const std::string& aIdent) const;
+  
      /**
       * Syntactic wrapper around FGPositioned::findClosest - find the closest
       * match for filter, and return it cast to FGAirport. The default filter
@@ -212,22 +217,12 @@ public:
       */
      static char** searchNamesAndIdents(const std::string& aFilter);
      
-     bool buildApproach(flightgear::Waypt* aEnroute, flightgear::STAR* aSTAR, 
-      FGRunway* aRwy, flightgear::WayptVec& aRoute);
+    void setCommStations(flightgear::CommStationList& comms);
     
-    /**
-     * Given a destiation point, select the best SID and transition waypt from 
-     * this airport. Returns (NULL,NULL) is no SIDs are defined, otherwise the
-     * best SID/transition is that which is closest to the destination point.
-     */
-    std::pair<flightgear::SID*, flightgear::WayptRef> selectSID(const SGGeod& aDest, FGRunway* aRwy);
-    
-    /**
-     * Select a STAR and enroute transition waypt, given an origin (departure) position.
-     * returns (NULL, NULL) is no suitable STAR is exists
-     */
-    std::pair<flightgear::STAR*, flightgear::WayptRef> selectSTAR(const SGGeod& aOrigin, FGRunway* aRwy);
+    flightgear::CommStationList commStationsOfType(FGPositioned::Type aTy) const;
     
+    const flightgear::CommStationList& commStations() const
+        { return mCommStations; }
 private:
     typedef std::vector<FGRunwayPtr>::const_iterator Runway_iterator;
     /**
@@ -242,7 +237,7 @@ private:
     /**
      * helper to read airport data from the scenery XML files.
      */
-    void loadSceneryDefintions() const;
+    void loadSceneryDefinitions() const;
     
     /**
      * Helpers to process property data loaded from an ICAO.threshold.xml file
@@ -275,6 +270,8 @@ private:
     std::vector<flightgear::SID*> mSIDs;
     std::vector<flightgear::STAR*> mSTARs;
     std::vector<flightgear::Approach*> mApproaches;
+    
+    flightgear::CommStationList mCommStations;
 };
 
 // find basic airport location info from airport database