flightmodel used to be called.
Fixed wind (it was 180 degrees off).
JSBSim.cxx JSBSim.hxx \
LaRCsim.cxx LaRCsim.hxx \
LaRCsimIC.cxx LaRCsimIC.hxx \
- MagicCarpet.cxx MagicCarpet.hxx
+ MagicCarpet.cxx MagicCarpet.hxx \
+ NullFDM.cxx NullFDM.hxx
bin_PROGRAMS = pstest
--- /dev/null
+// NullFDM.hxx -- a do-nothing flight model, used as a placeholder if the
+// action is externally driven.
+// Written by Curtis Olson, started November 1999.
+//
+// Copyright (C) 1999 - 2001 Curtis L. Olson - curt@flightgear.org
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// $Id$
+
+
+#include "NullFDM.hxx"
+
+
+FGNullFDM::FGNullFDM( double dt ) {
+ set_delta_t( dt );
+}
+
+
+FGNullFDM::~FGNullFDM() {
+}
+
+
+// Initialize the NullFDM flight model, dt is the time increment
+// for each subsequent iteration through the EOM
+void FGNullFDM::init() {
+ // cout << "FGNullFDM::init()" << endl;
+}
+
+
+// Run an iteration of the EOM. This is a NOP here because the flight
+// model values are getting filled in elsewhere (most likely from some
+// external source.)
+bool FGNullFDM::update( int multiloop ) {
+ // cout << "FGNullFDM::update()" << endl;
+
+ return true;
+}
--- /dev/null
+// NullFDM.hxx -- a do-nothing flight model, used as a placeholder if the
+// action is externally driven.
+//
+// Written by Curtis Olson, started November 1999.
+//
+// Copyright (C) 1999 - 2001 Curtis L. Olson - curt@flightgear.org
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of the
+// License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful, but
+// WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+//
+// $Id$
+
+
+#ifndef _NULLFDM_HXX
+#define _NULLFDM_HXX
+
+
+#include "flight.hxx"
+
+
+class FGNullFDM: public FGInterface {
+
+public:
+ FGNullFDM::FGNullFDM( double dt );
+ FGNullFDM::~FGNullFDM();
+
+ // reset flight params to a specific position
+ void init();
+
+ // update position based on inputs, positions, velocities, etc.
+ bool update( int multiloop );
+};
+
+
+#endif // _NULLFDM_HXX
-/* src/Include/config.h.in. Generated automatically from configure.in by autoheader. */
+/* src/Include/config.h.in. Generated automatically from configure.in by autoheader 2.13. */
/* Define to empty if the keyword does not work. */
#undef const
#include <FDM/JSBSim.hxx>
#include <FDM/LaRCsim.hxx>
#include <FDM/MagicCarpet.hxx>
+#include <FDM/NullFDM.hxx>
#include <Include/general.hxx>
#include <Input/input.hxx>
// #include <Joystick/joystick.hxx>
cur_fdm_state = new FGMagicCarpet( dt );
} else if (model == "external") {
cur_fdm_state = new FGExternal( dt );
+ } else if (model == "null") {
+ cur_fdm_state = new FGNullFDM( dt );
} else {
SG_LOG(SG_GENERAL, SG_ALERT,
"Unrecognized flight model '" << model
cur_fdm_state = new FGMagicCarpet( dt );
} else if (model == "external") {
cur_fdm_state = new FGExternal( dt );
+ } else if (model == "null") {
+ cur_fdm_state = new FGNullFDM( dt );
} else {
SG_LOG(SG_GENERAL, SG_ALERT,
"Unrecognized flight model '" << model
// convert to fps
speed *= SG_NM_TO_METER * SG_METER_TO_FEET * (1.0/3600);
- dir += 180;
+ // dir += 180;
if (dir >= 360)
dir -= 360;
dir *= SGD_DEGREES_TO_RADIANS;
cout << "Flight Model:" << endl;
cout << "\t--fdm=abcd: selects the core flight model code." << endl;
- cout << "\t\tcan be one of jsb, larcsim, magic, external, balloon, or ada"
+ cout << "\t\tcan be one of jsb, larcsim, magic, null, external, balloon, or ada"
<< endl;
cout << "\t--aircraft=abcd: aircraft model to load" << endl;
cout << "\t--model-hz=n: run the FDM this rate (iterations per second)"