Adding magic carpet FDM mode.
This commit is contained in:
parent
e78f205b38
commit
cecd5685ca
4 changed files with 17 additions and 12 deletions
|
@ -3,9 +3,10 @@ SUBDIRS = Balloon External JSBsim LaRCsim Slew
|
|||
noinst_LIBRARIES = libFlight.a
|
||||
|
||||
libFlight_a_SOURCES = \
|
||||
Balloon.cxx Balloon.hxx \
|
||||
Balloon.cxx Balloon.h \
|
||||
flight.cxx flight.hxx \
|
||||
JSBsim.cxx JSBsim.hxx \
|
||||
LaRCsim.cxx LaRCsim.hxx
|
||||
LaRCsim.cxx LaRCsim.hxx \
|
||||
MagicCarpet.cxx MagicCarpet.hxx
|
||||
|
||||
INCLUDES += -I$(top_builddir) -I$(top_builddir)/Lib -I$(top_builddir)/Simulator
|
||||
|
|
|
@ -111,8 +111,8 @@ public:
|
|||
|
||||
// Define the various supported flight models (many not yet implemented)
|
||||
enum {
|
||||
// Slew (in MS terminology)
|
||||
FG_SLEW = 0,
|
||||
// Magic Carpet mode
|
||||
FG_MAGICCARPET = 0,
|
||||
|
||||
// The NASA LaRCsim (Navion) flight model
|
||||
FG_LARCSIM = 1,
|
||||
|
|
|
@ -57,8 +57,9 @@
|
|||
#include <Autopilot/autopilot.hxx>
|
||||
#include <Cockpit/cockpit.hxx>
|
||||
// #include <FDM/Balloon.h>
|
||||
#include <FDM/LaRCsim.hxx>
|
||||
#include <FDM/JSBsim.hxx>
|
||||
#include <FDM/LaRCsim.hxx>
|
||||
#include <FDM/MagicCarpet.hxx>
|
||||
#include <Include/fg_constants.h>
|
||||
#include <Include/general.hxx>
|
||||
#include <Joystick/joystick.hxx>
|
||||
|
@ -235,6 +236,9 @@ bool fgInitSubsystems( void ) {
|
|||
// } else if ( current_options.get_flight_model() ==
|
||||
// FGInterface::FG_BALLOONSIM ) {
|
||||
// cur_fdm_state = new FGBalloonSim;
|
||||
} else if ( current_options.get_flight_model() ==
|
||||
FGInterface::FG_MAGICCARPET ) {
|
||||
cur_fdm_state = new FGMagicCarpet;
|
||||
} else {
|
||||
FG_LOG( FG_GENERAL, FG_ALERT,
|
||||
"No flight model, can't init aircraft" );
|
||||
|
|
|
@ -497,16 +497,16 @@ int
|
|||
fgOPTIONS::parse_fdm( const string& fm ) {
|
||||
// printf("fdm = %s\n", fm);
|
||||
|
||||
if ( fm == "slew" ) {
|
||||
return FGInterface::FG_SLEW;
|
||||
} else if ( fm == "jsb" ) {
|
||||
return FGInterface::FG_JSBSIM;
|
||||
} else if ( fm == "balloon" ) {
|
||||
if ( fm == "balloon" ) {
|
||||
return FGInterface::FG_BALLOONSIM;
|
||||
} else if ( (fm == "larcsim") || (fm == "LaRCsim") ) {
|
||||
return FGInterface::FG_LARCSIM;
|
||||
} else if ( fm == "external" ) {
|
||||
return FGInterface::FG_EXTERNAL;
|
||||
} else if ( fm == "jsb" ) {
|
||||
return FGInterface::FG_JSBSIM;
|
||||
} else if ( (fm == "larcsim") || (fm == "LaRCsim") ) {
|
||||
return FGInterface::FG_LARCSIM;
|
||||
} else if ( fm == "magic" ) {
|
||||
return FGInterface::FG_MAGICCARPET;
|
||||
} else {
|
||||
FG_LOG( FG_GENERAL, FG_ALERT, "Unknown fdm = " << fm );
|
||||
exit(-1);
|
||||
|
|
Loading…
Reference in a new issue