Enable the airway database parsing.
This commit is contained in:
parent
10ebe06285
commit
943b1b8e79
4 changed files with 19 additions and 2 deletions
|
@ -465,11 +465,11 @@ void FGAirportDynamics::getActiveRunway(const string &trafficType, int action, s
|
||||||
RunwayGroup *currRunwayGroup = 0;
|
RunwayGroup *currRunwayGroup = 0;
|
||||||
int nrActiveRunways = 0;
|
int nrActiveRunways = 0;
|
||||||
time_t dayStart = fgGetLong("/sim/time/utc/day-seconds");
|
time_t dayStart = fgGetLong("/sim/time/utc/day-seconds");
|
||||||
if (((dayStart - lastUpdate) > 600) || trafficType != prevTrafficType)
|
if ((fabs(dayStart - lastUpdate) > 600) || trafficType != prevTrafficType)
|
||||||
{
|
{
|
||||||
landing.clear();
|
landing.clear();
|
||||||
takeoff.clear();
|
takeoff.clear();
|
||||||
//lastUpdate = dayStart;
|
lastUpdate = dayStart;
|
||||||
prevTrafficType = trafficType;
|
prevTrafficType = trafficType;
|
||||||
|
|
||||||
FGEnvironment
|
FGEnvironment
|
||||||
|
|
|
@ -1085,6 +1085,16 @@ fgInitNav ()
|
||||||
fixlist->init( p_fix );
|
fixlist->init( p_fix );
|
||||||
globals->set_fixlist( fixlist );
|
globals->set_fixlist( fixlist );
|
||||||
|
|
||||||
|
SG_LOG(SG_GENERAL, SG_INFO, " Airways");
|
||||||
|
SGPath p_awy( globals->get_fg_root() );
|
||||||
|
p_awy.append( "Navaids/awy.dat" );
|
||||||
|
FGAirwayNetwork *awyNet = new FGAirwayNetwork;
|
||||||
|
//cerr << "Loading Airways" << endl;
|
||||||
|
awyNet->load (p_awy );
|
||||||
|
awyNet->init();
|
||||||
|
//cerr << "initializing airways" << endl;
|
||||||
|
globals->set_airwaynet( awyNet );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,6 +73,7 @@ class FGControls;
|
||||||
class FGFlightPlanDispatcher;
|
class FGFlightPlanDispatcher;
|
||||||
class FGIO;
|
class FGIO;
|
||||||
class FGNavList;
|
class FGNavList;
|
||||||
|
class FGAirwayNetwork;
|
||||||
class FGTACANList;
|
class FGTACANList;
|
||||||
class FGFixList;
|
class FGFixList;
|
||||||
class FGLight;
|
class FGLight;
|
||||||
|
@ -210,6 +211,7 @@ private:
|
||||||
FGNavList *carrierlist;
|
FGNavList *carrierlist;
|
||||||
FGTACANList *channellist;
|
FGTACANList *channellist;
|
||||||
FGFixList *fixlist;
|
FGFixList *fixlist;
|
||||||
|
FGAirwayNetwork *airwaynet;
|
||||||
|
|
||||||
//Mulitplayer managers
|
//Mulitplayer managers
|
||||||
FGMultiplayMgr *multiplayer_mgr;
|
FGMultiplayMgr *multiplayer_mgr;
|
||||||
|
@ -374,6 +376,10 @@ public:
|
||||||
inline FGTACANList *get_channellist() const { return channellist; }
|
inline FGTACANList *get_channellist() const { return channellist; }
|
||||||
inline void set_channellist( FGTACANList *c ) { channellist = c; }
|
inline void set_channellist( FGTACANList *c ) { channellist = c; }
|
||||||
|
|
||||||
|
inline FGAirwayNetwork *get_airwaynet() const { return airwaynet; }
|
||||||
|
inline void set_airwaynet( FGAirwayNetwork *a ) { airwaynet = a; }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Save the current state as the initial state.
|
* Save the current state as the initial state.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -174,6 +174,7 @@ time_t FGScheduledFlight::processTimeString(const string& theTime)
|
||||||
{
|
{
|
||||||
timeOffsetInDays = 0;
|
timeOffsetInDays = 0;
|
||||||
}
|
}
|
||||||
|
// TODO: verify status of each token.
|
||||||
targetHour = atoi(timeCopy.substr(0,2).c_str());
|
targetHour = atoi(timeCopy.substr(0,2).c_str());
|
||||||
targetMinute = atoi(timeCopy.substr(3,5).c_str());
|
targetMinute = atoi(timeCopy.substr(3,5).c_str());
|
||||||
targetSecond = atoi(timeCopy.substr(6,8).c_str());
|
targetSecond = atoi(timeCopy.substr(6,8).c_str());
|
||||||
|
|
Loading…
Reference in a new issue