]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/apt_loader.cxx
Added a small and simple dialogbox that allows the user to issue ATC commands.
[flightgear.git] / src / Airports / apt_loader.cxx
index af9319ae35cf81ba6a79ebe65ead10aa148089be..8bb9924e6a94e8269015683f7d3304ef3b8f3150 100644 (file)
@@ -39,6 +39,7 @@
 #include <simgear/misc/sgstream.hxx>
 #include <simgear/misc/strutils.hxx>
 #include <simgear/structure/exception.hxx>
+#include <simgear/bucket/newbucket.hxx>
 
 #include <string>
 
@@ -75,6 +76,8 @@ public:
      last_apt_type("")
   {}
 
+
+
   void parseAPT(const string &aptdb_file, FGCommList *comm_list)
   {
     sg_gzifstream in( aptdb_file );
@@ -155,7 +158,9 @@ public:
       } else if ( line_id == 0 ) {
           // ??
       } else if ( line_id == 50 ) {
+
         parseATISLine(comm_list, simgear::strutils::split(line));
+
       } else if ( line_id >= 51 && line_id <= 56 ) {
         // other frequency entries (ignore)
       } else if ( line_id == 110 ) {
@@ -229,7 +234,6 @@ private:
     SGGeod pos(SGGeod::fromDegFt(lon, lat, last_apt_elev));
     FGAirport* apt = new FGAirport(last_apt_id, pos, tower, last_apt_name, false,
         fptypeFromRobinType(atoi(last_apt_type.c_str())));
-        
     apt->setRunwaysAndTaxiways(runways, taxiways, pavements);
   }
   
@@ -461,7 +465,7 @@ private:
       pvt->addNode(pos, num == 113);
     }
   }
-  
+
   void parseATISLine(FGCommList *comm_list, const vector<string>& token) 
   {
     if ( rwy_count <= 0 ) {
@@ -505,8 +509,10 @@ private:
     << "  type: " << a.type );
 #endif
   }
+
 };
 
+
 // Load the airport data base from the specified aptdb file.  The
 // metar file is used to mark the airports as having metar available
 // or not.
@@ -515,9 +521,7 @@ bool fgAirportDBLoad( const string &aptdb_file,
 {
 
    APTLoader ld;
-
    ld.parseAPT(aptdb_file, comm_list);
-
     //
     // Load the metar.dat file and update apt db with stations that
     // have metar data.