#include <FDM/UIUCModel/uiuc_aircraftdir.h>
#include <Airports/runways.hxx>
#include <Airports/simple.hxx>
+#include <ATC/ATCdisplay.hxx>
#include <Autopilot/auto_gui.hxx>
#include <Autopilot/newauto.hxx>
#include <Cockpit/cockpit.hxx>
#include <FDM/JSBSim.hxx>
#include <FDM/LaRCsim.hxx>
#include <FDM/MagicCarpet.hxx>
+#include <FDM/NullFDM.hxx>
#include <Include/general.hxx>
#include <Input/input.hxx>
// #include <Joystick/joystick.hxx>
#include <Navaids/navlist.hxx>
#include <Scenery/scenery.hxx>
#include <Scenery/tilemgr.hxx>
+#include <Sound/fg_fx.hxx>
+#include <Sound/soundmgr.hxx>
#include <Time/event.hxx>
#include <Time/light.hxx>
#include <Time/sunpos.hxx>
// gear, its initialization call should located in this routine.
// Returns non-zero if a problem encountered.
bool fgInitSubsystems( void ) {
+ static const SGPropertyNode *longitude
+ = fgGetNode("/position/longitude-deg");
+ static const SGPropertyNode *latitude
+ = fgGetNode("/position/latitude-deg");
+ static const SGPropertyNode *altitude
+ = fgGetNode("/position/altitude-ft");
+
fgLIGHT *l = &cur_light_params;
SG_LOG( SG_GENERAL, SG_INFO, "Initialize Subsystems");
cur_fdm_state = new FGMagicCarpet( dt );
} else if (model == "external") {
cur_fdm_state = new FGExternal( dt );
+ } else if (model == "null") {
+ cur_fdm_state = new FGNullFDM( dt );
} else {
SG_LOG(SG_GENERAL, SG_ALERT,
"Unrecognized flight model '" << model
FGViewerRPH *pilot_view =
(FGViewerRPH *)globals->get_viewmgr()->get_view( 0 );
- pilot_view->set_geod_view_pos( cur_fdm_state->get_Longitude(),
- cur_fdm_state->get_Lat_geocentric(),
- cur_fdm_state->get_Altitude() *
- SG_FEET_TO_METER );
- pilot_view->set_sea_level_radius( cur_fdm_state->get_Sea_level_radius() *
- SG_FEET_TO_METER );
+ pilot_view->set_geod_view_pos( longitude->getDoubleValue()
+ * SGD_DEGREES_TO_RADIANS,
+ latitude->getDoubleValue()
+ * SGD_DEGREES_TO_RADIANS,
+ altitude->getDoubleValue()
+ * SG_FEET_TO_METER );
pilot_view->set_rph( cur_fdm_state->get_Phi(),
cur_fdm_state->get_Theta(),
cur_fdm_state->get_Psi() );
p_fix.append( "Navaids/default.fix" );
current_fixlist->init( p_fix );
+ ////////////////////////////////////////////////////////////////////
+ // Initialize ATC list management and query systems
+ ////////////////////////////////////////////////////////////////////
+
+ //DCL
+ SG_LOG(SG_GENERAL, SG_INFO, " ATIS");
+ current_atislist = new FGATISList;
+ SGPath p_atis( globals->get_fg_root() );
+ p_atis.append( "ATC/default.atis" );
+ current_atislist->init( p_atis );
+
+ ////////////////////////////////////////////////////////////////////
+ // Initialise ATC display system
+ ////////////////////////////////////////////////////////////////////
+
+ //DCL
+ SG_LOG(SG_GENERAL, SG_INFO, " ATC Display");
+ current_atcdisplay = new FGATCDisplay;
+ current_atcdisplay->init();
////////////////////////////////////////////////////////////////////
// Initialize the built-in commands.
fgInitCommands();
+ ////////////////////////////////////////////////////////////////////
+ // Initialize the sound subsystem.
+ ////////////////////////////////////////////////////////////////////
+
+ globals->set_soundmgr(new FGSoundMgr);
+ globals->get_soundmgr()->init();
+ globals->get_soundmgr()->bind();
+
+
+ ////////////////////////////////////////////////////////////////////
+ // Initialize the sound-effects subsystem.
+ ////////////////////////////////////////////////////////////////////
+ globals->set_fx(new FGFX);
+ globals->get_fx()->init();
+ globals->get_fx()->bind();
+
+
////////////////////////////////////////////////////////////////////
// Initialize the radio stack subsystem.
////////////////////////////////////////////////////////////////////
cur_fdm_state = new FGMagicCarpet( dt );
} else if (model == "external") {
cur_fdm_state = new FGExternal( dt );
+ } else if (model == "null") {
+ cur_fdm_state = new FGNullFDM( dt );
} else {
SG_LOG(SG_GENERAL, SG_ALERT,
"Unrecognized flight model '" << model