#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>
// 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.
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