]> git.mxchange.org Git - flightgear.git/commitdiff
Adding magic carpet FDM mode.
authorcurt <curt>
Thu, 14 Oct 1999 01:53:43 +0000 (01:53 +0000)
committercurt <curt>
Thu, 14 Oct 1999 01:53:43 +0000 (01:53 +0000)
src/FDM/Makefile.am
src/FDM/flight.hxx
src/Main/fg_init.cxx
src/Main/options.cxx

index a0c7e7a528ae6f41eae595a7833d3dbff4099164..aaedee216da78348e9ad96456cc103ec11107a9d 100644 (file)
@@ -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
index d17ce874cf9113b2878769f15e9b3965f7449bea..0f142124dc33e15b0278fe6fb12a6675a8712484 100644 (file)
@@ -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,
index b985be58345888e62e0bee92e606465327439a10..c55841088cf34cb241aee0c445b6af2e9d65aea8 100644 (file)
@@ -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" );
index 00e0ac99396ae53e40d16216e53a80ecb3046bb9..81ccfd085b8dcc7b2b47d7a555951ff77f2423a9 100644 (file)
@@ -497,16 +497,16 @@ int
 fgOPTIONS::parse_fdm( const string& fm ) {
     // printf("fdm = %s\n", fm);
 
-    if ( fm == "slew" ) {
-       return FGInterface::FG_SLEW;
+    if ( fm == "balloon" ) {
+       return FGInterface::FG_BALLOONSIM;
+    } else if ( fm == "external" ) {
+       return FGInterface::FG_EXTERNAL;
     } else if ( fm == "jsb" ) {
        return FGInterface::FG_JSBSIM;
-    } else 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 == "magic" ) {
+       return FGInterface::FG_MAGICCARPET;
     } else {
        FG_LOG( FG_GENERAL, FG_ALERT, "Unknown fdm = " << fm );
        exit(-1);