#include <Time/sunpos.hxx>
#include <Time/sunsolver.hxx>
#include <Time/tmp.hxx>
+#include <Traffic/TrafficMgr.hxx>
#ifdef FG_MPLAYER_AS
#include <MultiPlayer/multiplaytxmgr.hxx>
"Problems loading one or more navigational database" );
}
+ if ( fgGetBool("/sim/navdb/localizers/auto-align", true) ) {
+ // align all the localizers with their corresponding runways
+ // since data sources are good for cockpit navigation
+ // purposes, but not always to the error tolerances needed to
+ // exactly place these items.
+ double threshold
+ = fgGetDouble( "/sim/navdb/localizers/auto-align-threshold-deg",
+ 5.0 );
+ fgNavDBAlignLOCwithRunway( runways, loclist, threshold );
+ }
+
SG_LOG(SG_GENERAL, SG_INFO, " Fixes");
SGPath p_fix( globals->get_fg_root() );
p_fix.append( "Navaids/fix.dat" );
////////////////////////////////////////////////////////////////////
// Initialise the AI Model Manager
////////////////////////////////////////////////////////////////////
-
SG_LOG(SG_GENERAL, SG_INFO, " AI Model Manager");
globals->add_subsystem("ai_model", new FGAIManager);
+ // It's probably a good idea to initialize the top level traffic manager
+ // After the AI and ATC systems have been initialized properly.
+ // AI Traffic manager
+ globals->add_subsystem("Traffic Manager", new FGTrafficManager);
+ FGTrafficManager *dispatcher =
+ (FGTrafficManager*) globals->get_subsystem("Traffic Manager");
+
+ readXML(string(globals->get_fg_root() + string("/Traffic/fgtraffic.xml")),
+ *dispatcher);
+ globals->get_subsystem("Traffic Manager")->init();
+
globals->add_subsystem("instrumentation", new FGInstrumentMgr);
globals->add_subsystem("systems", new FGSystemMgr);
+
+
////////////////////////////////////////////////////////////////////
// Initialize the radio stack subsystem.
////////////////////////////////////////////////////////////////////