diff --git a/src/Aircraft/aircraft.cxx b/src/Aircraft/aircraft.cxx index 91e93b276..26b3502fe 100644 --- a/src/Aircraft/aircraft.cxx +++ b/src/Aircraft/aircraft.cxx @@ -48,43 +48,6 @@ #include "aircraft.hxx" - -// This is a record containing all the info for the aircraft currently -// being operated -fgAIRCRAFT current_aircraft; - - -// Initialize an Aircraft structure -void fgAircraftInit( void ) { - SG_LOG( SG_AIRCRAFT, SG_INFO, "Initializing Aircraft structure" ); - - current_aircraft.controls = globals->get_controls(); -} - - -// Display various parameters to stdout -void fgAircraftOutputCurrent(fgAIRCRAFT *a) { - FlightProperties f; - - SG_LOG( SG_FLIGHT, SG_DEBUG, - "Pos = (" - << (f.get_Longitude() * 3600.0 * SGD_RADIANS_TO_DEGREES) << "," - << (f.get_Latitude() * 3600.0 * SGD_RADIANS_TO_DEGREES) << "," - << f.get_Altitude() - << ") (Phi,Theta,Psi)=(" - << f.get_Phi() << "," - << f.get_Theta() << "," - << f.get_Psi() << ")" ); - - SG_LOG( SG_FLIGHT, SG_DEBUG, - "Kts = " << f.get_V_equiv_kts() - << " Elev = " << globals->get_controls()->get_elevator() - << " Aileron = " << globals->get_controls()->get_aileron() - << " Rudder = " << globals->get_controls()->get_rudder() - << " Power = " << globals->get_controls()->get_throttle( 0 ) ); -} - - // Show available aircraft types void fgReadAircraft(void) { @@ -137,7 +100,7 @@ void fgReadAircraft(void) { ulCloseDir(dirp); - globals->get_commands()->addCommand("load-aircraft", fgLoadAircraft); + } bool @@ -212,7 +175,7 @@ fgLoadAircraft (const SGPropertyNode * arg) fgInitPosition(); // Update the HUD - fgHUDInit(¤t_aircraft); + fgHUDInit(); SGTime *t = globals->get_time_params(); delete t; diff --git a/src/Aircraft/aircraft.hxx b/src/Aircraft/aircraft.hxx index f28bb4c22..6c06c0cfb 100644 --- a/src/Aircraft/aircraft.hxx +++ b/src/Aircraft/aircraft.hxx @@ -26,30 +26,8 @@ #ifndef _AIRCRAFT_HXX #define _AIRCRAFT_HXX -class FGControls; class SGPropertyNode; -// Define a structure containing all the parameters for an aircraft -typedef struct{ - FGControls *controls; -} fgAIRCRAFT ; - - -// current_aircraft contains all the parameters of the aircraft -// currently being operated. -extern fgAIRCRAFT current_aircraft; - - -// Initialize an Aircraft structure -void fgAircraftInit( void ); - - -// Display various parameters to stdout -void fgAircraftOutputCurrent(fgAIRCRAFT *a); - - -// Read the list of available aircraft into to property tree -void fgReadAircraft(void); bool fgLoadAircraft (const SGPropertyNode * arg); #endif // _AIRCRAFT_HXX diff --git a/src/Cockpit/cockpit.cxx b/src/Cockpit/cockpit.cxx index a959978fc..54ccd2a23 100644 --- a/src/Cockpit/cockpit.cxx +++ b/src/Cockpit/cockpit.cxx @@ -36,7 +36,6 @@ #include #include -#include #include #include
@@ -360,7 +359,7 @@ float get_aux18 (void) #endif -bool fgCockpitInit( fgAIRCRAFT *cur_aircraft ) +bool fgCockpitInit() { SG_LOG( SG_COCKPIT, SG_INFO, "Initializing cockpit subsystem" ); @@ -376,7 +375,7 @@ bool fgCockpitInit( fgAIRCRAFT *cur_aircraft ) // HI_Head is now a null pointer so we can generate a new list from the // current aircraft. - fgHUDInit( cur_aircraft ); + fgHUDInit(); return true; } diff --git a/src/Cockpit/cockpit.hxx b/src/Cockpit/cockpit.hxx index 9c7a5c9d2..91c415514 100644 --- a/src/Cockpit/cockpit.hxx +++ b/src/Cockpit/cockpit.hxx @@ -33,10 +33,7 @@ #include -#include -#include "panel.hxx" - -bool fgCockpitInit( fgAIRCRAFT *cur_aircraft ); +bool fgCockpitInit(); void fgCockpitUpdate( osg::State* ); #endif /* _COCKPIT_HXX */ diff --git a/src/Cockpit/hud.cxx b/src/Cockpit/hud.cxx index b06a1917b..57c2264e8 100644 --- a/src/Cockpit/hud.cxx +++ b/src/Cockpit/hud.cxx @@ -42,8 +42,6 @@ #include -#include -//#include #include // FGFontCache #include
#include @@ -230,7 +228,7 @@ int readHud( istream &input ) // display for a Piper Cub doesn't show the speed range of a North American // mustange and the engine readouts of a B36! // -int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ ) +int fgHUDInit() { HUD_style = 1; @@ -282,7 +280,7 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ ) } -int fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ ) +int fgHUDInit2() { HUD_style = 2; diff --git a/src/Cockpit/hud.hxx b/src/Cockpit/hud.hxx index 0d727ccd3..bec30f553 100644 --- a/src/Cockpit/hud.hxx +++ b/src/Cockpit/hud.hxx @@ -54,7 +54,6 @@ namespace osg { #include #include -#include #include #include #include @@ -694,8 +693,8 @@ public: }; -extern int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ ); -extern int fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ ); +extern int fgHUDInit(); +extern int fgHUDInit2(); extern void fgUpdateHUD( osg::State* ); extern void fgUpdateHUD( osg::State*, GLfloat x_start, GLfloat y_start, GLfloat x_end, GLfloat y_end ); diff --git a/src/Cockpit/hud_rwy.cxx b/src/Cockpit/hud_rwy.cxx index b920bcfc8..2be152523 100644 --- a/src/Cockpit/hud_rwy.cxx +++ b/src/Cockpit/hud_rwy.cxx @@ -27,7 +27,6 @@ #include #include
#include -#include #include #include #include diff --git a/src/Environment/environment_mgr.cxx b/src/Environment/environment_mgr.cxx index a5d76ecfc..15268f93e 100644 --- a/src/Environment/environment_mgr.cxx +++ b/src/Environment/environment_mgr.cxx @@ -32,7 +32,6 @@ #include
#include
-#include #include #include "environment.hxx" diff --git a/src/FDM/JSBSim/JSBSim.cxx b/src/FDM/JSBSim/JSBSim.cxx index e9732f772..6409004fc 100644 --- a/src/FDM/JSBSim/JSBSim.cxx +++ b/src/FDM/JSBSim/JSBSim.cxx @@ -38,7 +38,6 @@ #include -#include #include #include
#include
diff --git a/src/FDM/JSBSim/JSBSim.hxx b/src/FDM/JSBSim/JSBSim.hxx index 8eb05feae..beb33e87b 100644 --- a/src/FDM/JSBSim/JSBSim.hxx +++ b/src/FDM/JSBSim/JSBSim.hxx @@ -38,7 +38,6 @@ INCLUDES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ #undef MAX_ENGINES -#include #include "math/FGColumnVector3.h" /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/src/FDM/LaRCsim/LaRCsim.cxx b/src/FDM/LaRCsim/LaRCsim.cxx index 611849dff..850532f34 100644 --- a/src/FDM/LaRCsim/LaRCsim.cxx +++ b/src/FDM/LaRCsim/LaRCsim.cxx @@ -31,7 +31,6 @@ #include #include -#include #include #include #include diff --git a/src/FDM/SP/BalloonSim.cpp b/src/FDM/SP/BalloonSim.cpp index 264d49b37..add046cac 100644 --- a/src/FDM/SP/BalloonSim.cpp +++ b/src/FDM/SP/BalloonSim.cpp @@ -48,8 +48,6 @@ HISTORY #include -#include - #include "BalloonSim.h" /****************************************************************************/ diff --git a/src/FDM/UIUCModel/uiuc_gear.cpp b/src/FDM/UIUCModel/uiuc_gear.cpp index da120d29f..31a87d0b9 100644 --- a/src/FDM/UIUCModel/uiuc_gear.cpp +++ b/src/FDM/UIUCModel/uiuc_gear.cpp @@ -67,7 +67,6 @@ #include #include -#include #include
#include "uiuc_gear.h" diff --git a/src/FDM/UIUCModel/uiuc_recorder.cpp b/src/FDM/UIUCModel/uiuc_recorder.cpp index 97e93b59c..3264ad184 100644 --- a/src/FDM/UIUCModel/uiuc_recorder.cpp +++ b/src/FDM/UIUCModel/uiuc_recorder.cpp @@ -94,7 +94,6 @@ #include #include -#include #include
#include "uiuc_recorder.h" diff --git a/src/FDM/UIUCModel/uiuc_wrapper.cpp b/src/FDM/UIUCModel/uiuc_wrapper.cpp index c11cbc97e..79bbe74c3 100644 --- a/src/FDM/UIUCModel/uiuc_wrapper.cpp +++ b/src/FDM/UIUCModel/uiuc_wrapper.cpp @@ -86,7 +86,6 @@ #include #include -#include #include
#include "uiuc_aircraft.h" diff --git a/src/Instrumentation/HUD/HUD_runway.cxx b/src/Instrumentation/HUD/HUD_runway.cxx index 3e3d51701..450f118a3 100644 --- a/src/Instrumentation/HUD/HUD_runway.cxx +++ b/src/Instrumentation/HUD/HUD_runway.cxx @@ -29,7 +29,6 @@ #include
#include -#include #include #include #include diff --git a/src/Instrumentation/kr_87.cxx b/src/Instrumentation/kr_87.cxx index 41928a097..30c0cbe66 100644 --- a/src/Instrumentation/kr_87.cxx +++ b/src/Instrumentation/kr_87.cxx @@ -32,7 +32,6 @@ #include #include -#include #include #include "kr_87.hxx" diff --git a/src/Instrumentation/kt_70.cxx b/src/Instrumentation/kt_70.cxx index 99787b71f..ec48bf84d 100644 --- a/src/Instrumentation/kt_70.cxx +++ b/src/Instrumentation/kt_70.cxx @@ -32,8 +32,6 @@ #include #include -#include - #include "kt_70.hxx" diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index 5e90575dc..1a85d9b8a 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -1315,14 +1315,14 @@ do_increase_visibility (const SGPropertyNode * arg) static bool do_hud_init(const SGPropertyNode *) { - fgHUDInit(0); // minimal HUD + fgHUDInit(); // minimal HUD return true; } static bool do_hud_init2(const SGPropertyNode *) { - fgHUDInit2(0); // normal HUD + fgHUDInit2(); // normal HUD return true; } diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index 72f6849e9..27cc0866b 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -64,7 +64,6 @@ #include #include -#include #include #include #include @@ -1407,11 +1406,6 @@ bool fgInitSubsystems() { //////////////////////////////////////////////////////////////////// globals->add_subsystem("flight", new FDMShell, SGSubsystemMgr::FDM); - - // allocates structures so must happen before any of the flight - // model or control parameters are set - fgAircraftInit(); // In the future this might not be the case. - //////////////////////////////////////////////////////////////////// // Initialize the weather subsystem. @@ -1525,10 +1519,7 @@ bool fgInitSubsystems() { globals->add_subsystem("Traffic Manager", new FGTrafficManager); - //////////////////////////////////////////////////////////////////// - // Initialize the cockpit subsystem - //////////////////////////////////////////////////////////////////// - if( fgCockpitInit( ¤t_aircraft )) { + if( fgCockpitInit()) { // Cockpit initialized ok. } else { SG_LOG( SG_GENERAL, SG_ALERT, "Error in Cockpit initialization!" ); @@ -1641,10 +1632,6 @@ void fgReInitSubsystems() // Initialize the FDM globals->get_subsystem("flight")->reinit(); - - // allocates structures so must happen before any of the flight - // model or control parameters are set - fgAircraftInit(); // In the future this might not be the case. // reload offsets from config defaults globals->get_viewmgr()->reinit(); diff --git a/src/Main/main.cxx b/src/Main/main.cxx index c02006a01..5d88ab30b 100644 --- a/src/Main/main.cxx +++ b/src/Main/main.cxx @@ -54,6 +54,7 @@ #include