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
|
noinst_LIBRARIES = libFlight.a
|
||||||
|
|
||||||
libFlight_a_SOURCES = \
|
libFlight_a_SOURCES = \
|
||||||
Balloon.cxx Balloon.hxx \
|
Balloon.cxx Balloon.h \
|
||||||
flight.cxx flight.hxx \
|
flight.cxx flight.hxx \
|
||||||
JSBsim.cxx JSBsim.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
|
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)
|
// Define the various supported flight models (many not yet implemented)
|
||||||
enum {
|
enum {
|
||||||
// Slew (in MS terminology)
|
// Magic Carpet mode
|
||||||
FG_SLEW = 0,
|
FG_MAGICCARPET = 0,
|
||||||
|
|
||||||
// The NASA LaRCsim (Navion) flight model
|
// The NASA LaRCsim (Navion) flight model
|
||||||
FG_LARCSIM = 1,
|
FG_LARCSIM = 1,
|
||||||
|
|
|
@ -57,8 +57,9 @@
|
||||||
#include <Autopilot/autopilot.hxx>
|
#include <Autopilot/autopilot.hxx>
|
||||||
#include <Cockpit/cockpit.hxx>
|
#include <Cockpit/cockpit.hxx>
|
||||||
// #include <FDM/Balloon.h>
|
// #include <FDM/Balloon.h>
|
||||||
#include <FDM/LaRCsim.hxx>
|
|
||||||
#include <FDM/JSBsim.hxx>
|
#include <FDM/JSBsim.hxx>
|
||||||
|
#include <FDM/LaRCsim.hxx>
|
||||||
|
#include <FDM/MagicCarpet.hxx>
|
||||||
#include <Include/fg_constants.h>
|
#include <Include/fg_constants.h>
|
||||||
#include <Include/general.hxx>
|
#include <Include/general.hxx>
|
||||||
#include <Joystick/joystick.hxx>
|
#include <Joystick/joystick.hxx>
|
||||||
|
@ -235,6 +236,9 @@ bool fgInitSubsystems( void ) {
|
||||||
// } else if ( current_options.get_flight_model() ==
|
// } else if ( current_options.get_flight_model() ==
|
||||||
// FGInterface::FG_BALLOONSIM ) {
|
// FGInterface::FG_BALLOONSIM ) {
|
||||||
// cur_fdm_state = new FGBalloonSim;
|
// cur_fdm_state = new FGBalloonSim;
|
||||||
|
} else if ( current_options.get_flight_model() ==
|
||||||
|
FGInterface::FG_MAGICCARPET ) {
|
||||||
|
cur_fdm_state = new FGMagicCarpet;
|
||||||
} else {
|
} else {
|
||||||
FG_LOG( FG_GENERAL, FG_ALERT,
|
FG_LOG( FG_GENERAL, FG_ALERT,
|
||||||
"No flight model, can't init aircraft" );
|
"No flight model, can't init aircraft" );
|
||||||
|
|
|
@ -497,16 +497,16 @@ int
|
||||||
fgOPTIONS::parse_fdm( const string& fm ) {
|
fgOPTIONS::parse_fdm( const string& fm ) {
|
||||||
// printf("fdm = %s\n", fm);
|
// printf("fdm = %s\n", fm);
|
||||||
|
|
||||||
if ( fm == "slew" ) {
|
if ( fm == "balloon" ) {
|
||||||
return FGInterface::FG_SLEW;
|
|
||||||
} else if ( fm == "jsb" ) {
|
|
||||||
return FGInterface::FG_JSBSIM;
|
|
||||||
} else if ( fm == "balloon" ) {
|
|
||||||
return FGInterface::FG_BALLOONSIM;
|
return FGInterface::FG_BALLOONSIM;
|
||||||
} else if ( (fm == "larcsim") || (fm == "LaRCsim") ) {
|
|
||||||
return FGInterface::FG_LARCSIM;
|
|
||||||
} else if ( fm == "external" ) {
|
} else if ( fm == "external" ) {
|
||||||
return FGInterface::FG_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 {
|
} else {
|
||||||
FG_LOG( FG_GENERAL, FG_ALERT, "Unknown fdm = " << fm );
|
FG_LOG( FG_GENERAL, FG_ALERT, "Unknown fdm = " << fm );
|
||||||
exit(-1);
|
exit(-1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue