#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) {
ulCloseDir(dirp);
- globals->get_commands()->addCommand("load-aircraft", fgLoadAircraft);
+
}
bool
fgInitPosition();
// Update the HUD
- fgHUDInit(¤t_aircraft);
+ fgHUDInit();
SGTime *t = globals->get_time_params();
delete t;
#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
#include <simgear/props/props.hxx>
#include <simgear/timing/sg_time.hxx>
-#include <Aircraft/aircraft.hxx>
#include <Include/general.hxx>
#include <Main/globals.hxx>
#endif
-bool fgCockpitInit( fgAIRCRAFT *cur_aircraft )
+bool fgCockpitInit()
{
SG_LOG( SG_COCKPIT, SG_INFO, "Initializing cockpit subsystem" );
// HI_Head is now a null pointer so we can generate a new list from the
// current aircraft.
- fgHUDInit( cur_aircraft );
+ fgHUDInit();
return true;
}
#include <osg/State>
-#include <Aircraft/aircraft.hxx>
-#include "panel.hxx"
-
-bool fgCockpitInit( fgAIRCRAFT *cur_aircraft );
+bool fgCockpitInit();
void fgCockpitUpdate( osg::State* );
#endif /* _COCKPIT_HXX */
#include <osg/GLU>
-#include <Aircraft/aircraft.hxx>
-//#include <Autopilot/xmlauto.hxx>
#include <GUI/new_gui.hxx> // FGFontCache
#include <Main/globals.hxx>
#include <Scenery/scenery.hxx>
// 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;
}
-int fgHUDInit2( fgAIRCRAFT * /* current_aircraft */ )
+int fgHUDInit2()
{
HUD_style = 2;
#include <simgear/constants.h>
#include <Include/fg_typedefs.h>
-#include <Aircraft/aircraft.hxx>
#include <Aircraft/controls.hxx>
#include <FDM/flight.hxx>
#include <GUI/gui.h>
};
-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 );
#include <math.h>
#include <Main/globals.hxx>
#include <Scenery/scenery.hxx>
-#include <Aircraft/aircraft.hxx>
#include <Environment/environment.hxx>
#include <Environment/environment_mgr.hxx>
#include <ATCDCL/ATCutils.hxx>
#include <Main/main.hxx>
#include <Main/fg_props.hxx>
-#include <Aircraft/aircraft.hxx>
#include <FDM/flight.hxx>
#include "environment.hxx"
#include <FDM/flight.hxx>
-#include <Aircraft/aircraft.hxx>
#include <Aircraft/controls.hxx>
#include <Main/globals.hxx>
#include <Main/fg_props.hxx>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#undef MAX_ENGINES
-#include <Aircraft/aircraft.hxx>
#include "math/FGColumnVector3.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#include <simgear/debug/logstream.hxx>
#include <simgear/scene/model/placement.hxx>
-#include <Aircraft/aircraft.hxx>
#include <Aircraft/controls.hxx>
#include <FDM/flight.hxx>
#include <FDM/UIUCModel/uiuc_aircraft.h>
#include <simgear/constants.h>
-#include <Aircraft/aircraft.hxx>
-
#include "BalloonSim.h"
/****************************************************************************/
#include <simgear/compiler.h>
#include <simgear/misc/sg_path.hxx>
-#include <Aircraft/aircraft.hxx>
#include <Main/fg_props.hxx>
#include "uiuc_gear.h"
#include <simgear/compiler.h>
#include <simgear/misc/sg_path.hxx>
-#include <Aircraft/aircraft.hxx>
#include <Main/fg_props.hxx>
#include "uiuc_recorder.h"
#include <simgear/compiler.h>
#include <simgear/misc/sg_path.hxx>
-#include <Aircraft/aircraft.hxx>
#include <Main/fg_props.hxx>
#include "uiuc_aircraft.h"
#include <Main/globals.hxx>
#include <Scenery/scenery.hxx>
-#include <Aircraft/aircraft.hxx>
#include <Aircraft/controls.hxx>
#include <FDM/flight.hxx>
#include <Environment/environment.hxx>
#include <simgear/math/sg_geodesy.hxx>
#include <simgear/timing/sg_time.hxx>
-#include <Aircraft/aircraft.hxx>
#include <Navaids/navlist.hxx>
#include "kr_87.hxx"
#include <simgear/compiler.h>
#include <simgear/math/sg_random.h>
-#include <Aircraft/aircraft.hxx>
-
#include "kt_70.hxx"
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;
}
#include <simgear/timing/sg_time.hxx>
#include <simgear/timing/lowleveltime.h>
-#include <Aircraft/aircraft.hxx>
#include <Aircraft/controls.hxx>
#include <Aircraft/replay.hxx>
#include <Airports/apt_loader.hxx>
////////////////////////////////////////////////////////////////////
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.
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!" );
// 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();
#include <Time/light.hxx>
#include <Include/general.hxx>
#include <Aircraft/replay.hxx>
+#include <Aircraft/aircraft.hxx>
#include <Cockpit/cockpit.hxx>
#include <Cockpit/hud.hxx>
#include <Model/panelnode.hxx>
} else if ( idle_state == 2 ) {
idle_state++;
- // Read the list of available aircraft
- fgReadAircraft();
+
+ globals->get_commands()->addCommand("load-aircraft", fgLoadAircraft);
+
fgSplashProgress("reading airport & navigation data");
// setup OpenGL view parameters
globals->get_renderer()->init();
- SG_LOG( SG_GENERAL, SG_INFO, "Panel visible = " << fgPanelVisible() );
globals->get_renderer()->resize( fgGetInt("/sim/startup/xsize"),
fgGetInt("/sim/startup/ysize") );
#include <Time/light.hxx>
#include <Time/light.hxx>
-#include <Aircraft/aircraft.hxx>
#include <Cockpit/panel.hxx>
#include <Cockpit/cockpit.hxx>
#include <Cockpit/hud.hxx>
#include <simgear/io/iochannel.hxx>
#include <simgear/misc/stdint.hxx>
-#include <Aircraft/aircraft.hxx>
#include <Main/fg_props.hxx>
#include "jsclient.hxx"