#include <simgear/misc/sgstream.hxx>
#include <simgear/misc/strutils.hxx>
#include <simgear/structure/exception.hxx>
+#include <simgear/bucket/newbucket.hxx>
#include <string>
#include "simple.hxx"
#include "runways.hxx"
#include "pavement.hxx"
-#if ENABLE_ATCDCL
-# include <ATCDCL/commlist.hxx>
-#endif
+#include <ATCDCL/commlist.hxx>
#include <iostream>
{}
-#ifdef ENABLE_ATCDCL
+
void parseAPT(const string &aptdb_file, FGCommList *comm_list)
-#else
- void parseAPT(const string &aptdb_file)
-#endif
{
sg_gzifstream in( aptdb_file );
} 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 ) {
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);
}
pvt->addNode(pos, num == 113);
}
}
-#if ENABLE_ATCDCL
+
void parseATISLine(FGCommList *comm_list, const vector<string>& token)
{
if ( rwy_count <= 0 ) {
<< " type: " << a.type );
#endif
}
-#endif
+
};
// metar file is used to mark the airports as having metar available
// or not.
bool fgAirportDBLoad( const string &aptdb_file,
-#if ENABLE_ATCDCL
FGCommList *comm_list, const std::string &metar_file )
-#else
- const std::string &metar_file )
-#endif
{
APTLoader ld;
-#if ENABLE_ATCDCL
ld.parseAPT(aptdb_file, comm_list);
-#else
- ld.parseAPT(aptdb_file);
-#endif
//
// Load the metar.dat file and update apt db with stations that
// have metar data.