1
0
Fork 0

Latest JSBSim updates, including use of new "JSBSim" namespace

This commit is contained in:
tony 2003-01-24 12:55:28 +00:00
parent 9679c7da15
commit a9d81f2e65
104 changed files with 769 additions and 191 deletions

View file

@ -41,6 +41,8 @@ INCLUDES
#include "FGCoefficient.h" #include "FGCoefficient.h"
#include "FGPropertyManager.h" #include "FGPropertyManager.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_AERODYNAMICS; static const char *IdHdr = ID_AERODYNAMICS;
@ -404,3 +406,4 @@ void FGAerodynamics::Debug(int from)
} }
} }
} // namespace JSBSim

View file

@ -94,6 +94,7 @@ CLASS DOCUMENTATION
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGAerodynamics : public FGModel { class FGAerodynamics : public FGModel {
@ -177,6 +178,8 @@ private:
void Debug(int from); void Debug(int from);
}; };
} // namespace JSBSim
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -84,6 +84,8 @@ INCLUDES
#include "FGOutput.h" #include "FGOutput.h"
#include "FGPropertyManager.h" #include "FGPropertyManager.h"
namespace JSBSim {
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS DEFINITIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@ -380,3 +382,4 @@ void FGAircraft::Debug(int from)
} }
} }
} // namespace JSBSim

View file

@ -109,6 +109,8 @@ CLASS DOCUMENTATION
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGAircraft : public FGModel { class FGAircraft : public FGModel {
public: public:
/** Constructor /** Constructor
@ -186,6 +188,7 @@ private:
void Debug(int from); void Debug(int from);
}; };
} // namespace JSBSim
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -62,6 +62,8 @@ INCLUDES
#include "FGColumnVector4.h" #include "FGColumnVector4.h"
#include "FGPropertyManager.h" #include "FGPropertyManager.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_ATMOSPHERE; static const char *IdHdr = ID_ATMOSPHERE;
@ -431,3 +433,4 @@ void FGAtmosphere::Debug(int from)
} }
} }
} // namespace JSBSim

View file

@ -82,6 +82,8 @@ CLASS DOCUMENTATION
CLASS DECLARATION CLASS DECLARATION
*******************************************************************************/ *******************************************************************************/
namespace JSBSim {
class FGAtmosphere : public FGModel { class FGAtmosphere : public FGModel {
public: public:
@ -190,6 +192,8 @@ private:
void Debug(int from); void Debug(int from);
}; };
} // namespace JSBSim
/******************************************************************************/ /******************************************************************************/
#endif #endif

View file

@ -57,6 +57,8 @@ INCLUDES
#include "FGColumnVector4.h" #include "FGColumnVector4.h"
#include "FGPropertyManager.h" #include "FGPropertyManager.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_AUXILIARY; static const char *IdHdr = ID_AUXILIARY;
@ -315,3 +317,4 @@ void FGAuxiliary::Debug(int from)
} }
} }
} // namespace JSBSim

View file

@ -75,6 +75,8 @@ CLASS DOCUMENTATION
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGAuxiliary : public FGModel { class FGAuxiliary : public FGModel {
public: public:
/** Constructor /** Constructor
@ -129,6 +131,8 @@ private:
void Debug(int from); void Debug(int from);
}; };
} // namespace JSBSim
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -61,6 +61,8 @@ INCLUDES
# include STL_IOMANIP # include STL_IOMANIP
#endif #endif
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_COEFFICIENT; static const char *IdHdr = ID_COEFFICIENT;
@ -420,3 +422,4 @@ void FGCoefficient::Debug(int from)
} }
} }
} // namespace JSBSim

View file

@ -61,6 +61,8 @@ using std::vector;
FORWARD DECLARATIONS FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGFDMExec; class FGFDMExec;
class FGState; class FGState;
class FGAtmosphere; class FGAtmosphere;
@ -208,6 +210,8 @@ private:
virtual void Debug(int from); virtual void Debug(int from);
}; };
} // using namespace JSBSim
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -20,6 +20,8 @@ INCLUDES
#include "FGColumnVector3.h" #include "FGColumnVector3.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_COLUMNVECTOR3; static const char *IdHdr = ID_COLUMNVECTOR3;
@ -324,3 +326,4 @@ void FGColumnVector3::Debug(int from)
} }
} }
} // namespace JSBSim

View file

@ -66,6 +66,8 @@ FORWARD DECLARATIONS
DECLARATION: FGColumnVector3 DECLARATION: FGColumnVector3
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGColumnVector3 : public FGJSBBase class FGColumnVector3 : public FGJSBBase
{ {
public: public:
@ -110,6 +112,6 @@ private:
int rowCtr; int rowCtr;
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -20,6 +20,8 @@ INCLUDES
#include "FGColumnVector4.h" #include "FGColumnVector4.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_COLUMNVECTOR4; static const char *IdHdr = ID_COLUMNVECTOR4;
@ -309,5 +311,4 @@ void FGColumnVector4::Debug(int from)
} }
} }
} }
}

View file

@ -66,6 +66,8 @@ FORWARD DECLARATIONS
DECLARATION: FGColumnVector4 DECLARATION: FGColumnVector4
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGColumnVector4 : public FGJSBBase class FGColumnVector4 : public FGJSBBase
{ {
public: public:
@ -109,7 +111,7 @@ private:
int rowCtr; int rowCtr;
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -21,6 +21,8 @@ INCLUDES
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_CONFIGFILE; static const char *IdHdr = ID_CONFIGFILE;
@ -339,4 +341,4 @@ void FGConfigFile::Debug(int from)
} }
} }
} }
}

View file

@ -104,6 +104,8 @@ CLASS DOCUMENTATION
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGConfigFile : public FGJSBBase class FGConfigFile : public FGJSBBase
{ {
public: public:
@ -146,7 +148,7 @@ private:
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -56,6 +56,8 @@ INCLUDES
#include "FGEngine.h" #include "FGEngine.h"
#include "FGTank.h" #include "FGTank.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_ENGINE; static const char *IdHdr = ID_ENGINE;
@ -211,4 +213,4 @@ void FGEngine::Debug(int from)
} }
} }
} }
}

View file

@ -67,6 +67,9 @@ DEFINITIONS
#define ID_ENGINE "$Id$" #define ID_ENGINE "$Id$"
using std::string; using std::string;
using std::vector;
namespace JSBSim {
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FORWARD DECLARATIONS FORWARD DECLARATIONS
@ -84,8 +87,6 @@ class FGPosition;
class FGAuxiliary; class FGAuxiliary;
class FGOutput; class FGOutput;
using std::vector;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs] COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@ -241,7 +242,7 @@ protected:
vector <int> SourceTanks; vector <int> SourceTanks;
virtual void Debug(int from); virtual void Debug(int from);
}; };
}
#include "FGState.h" #include "FGState.h"
#include "FGFDMExec.h" #include "FGFDMExec.h"
#include "FGAtmosphere.h" #include "FGAtmosphere.h"

View file

@ -57,6 +57,8 @@ INCLUDES
#include "filtersjb/FGSummer.h" #include "filtersjb/FGSummer.h"
#include "filtersjb/FGKinemat.h" #include "filtersjb/FGKinemat.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_FCS; static const char *IdHdr = ID_FCS;
@ -896,3 +898,4 @@ void FGFCS::Debug(int from)
} }
} }
}

View file

@ -65,6 +65,8 @@ DEFINITIONS
FORWARD DECLARATIONS FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
typedef enum { iDe=0, iDaL, iDaR, iDr, iDsb, iDsp, iDf, NNorm } FcIdx; typedef enum { iDe=0, iDaL, iDaR, iDr, iDsb, iDsp, iDf, NNorm } FcIdx;
typedef enum { ofRad=0, ofNorm, ofMag , NForms} OutputForm; typedef enum { ofRad=0, ofNorm, ofMag , NForms} OutputForm;
@ -644,7 +646,7 @@ private:
int ToNormalize[NNorm]; int ToNormalize[NNorm];
void Debug(int from); void Debug(int from);
}; };
}
#endif #endif

View file

@ -73,6 +73,8 @@ INCLUDES
#include "FGInitialCondition.h" #include "FGInitialCondition.h"
#include "FGPropertyManager.h" #include "FGPropertyManager.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_FDMEXEC; static const char *IdHdr = ID_FDMEXEC;
@ -245,12 +247,11 @@ bool FGFDMExec::Allocate(void)
if (Error > 0) result = false; if (Error > 0) result = false;
IC = new FGInitialCondition(this); IC = new FGInitialCondition(this);
//Trim is allocated as needed by GetTrim()
// Schedule a model. The second arg (the integer) is the pass number. For // Schedule a model. The second arg (the integer) is the pass number. For
// instance, the atmosphere model gets executed every fifth pass it is called // instance, the atmosphere model gets executed every fifth pass it is called
// by the executive. Everything else here gets executed each pass. // by the executive. Everything else here gets executed each pass.
// IC and Trim objects are NOT scheduled.
Schedule(Atmosphere, 1); Schedule(Atmosphere, 1);
Schedule(FCS, 1); Schedule(FCS, 1);
@ -265,9 +266,6 @@ bool FGFDMExec::Allocate(void)
Schedule(Position, 1); Schedule(Position, 1);
Schedule(Auxiliary, 1); Schedule(Auxiliary, 1);
Schedule(Output, 1); Schedule(Output, 1);
//IC and Trim are *not* scheduled objects
modelLoaded = false; modelLoaded = false;
@ -700,4 +698,5 @@ void FGFDMExec::Debug(int from)
} }
} }
} }
}

View file

@ -113,6 +113,8 @@ CLASS DOCUMENTATION
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGFDMExec : public FGJSBBase class FGFDMExec : public FGJSBBase
{ {
public: public:
@ -317,7 +319,7 @@ private:
bool DeAllocate(void); bool DeAllocate(void);
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -60,6 +60,8 @@ INCLUDES
# include STL_IOMANIP # include STL_IOMANIP
#endif #endif
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_FACTORGROUP; static const char *IdHdr = ID_FACTORGROUP;
@ -200,3 +202,4 @@ void FGFactorGroup::Debug(int from)
} }
} }
}

View file

@ -62,6 +62,8 @@ using std::vector;
FORWARD DECLARATIONS FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGFDMExec; class FGFDMExec;
class FGState; class FGState;
class FGAtmosphere; class FGAtmosphere;
@ -120,5 +122,5 @@ private:
FGPropertyManager *node; FGPropertyManager *node;
void Debug(int from); void Debug(int from);
}; };
}
#endif #endif

View file

@ -48,6 +48,8 @@ and the cg.
#include "FGColumnVector4.h" #include "FGColumnVector4.h"
#include "FGForce.h" #include "FGForce.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_FORCE; static const char *IdHdr = ID_FORCE;
@ -179,4 +181,4 @@ void FGForce::Debug(int from)
} }
} }
} }
}

View file

@ -217,6 +217,8 @@ and vMn, the moments, can be made directly. Otherwise, the usage is similar.<br>
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGForce : public FGJSBBase class FGForce : public FGJSBBase
{ {
public: public:
@ -328,6 +330,6 @@ private:
virtual void Debug(int from); virtual void Debug(int from);
}; };
}
#endif #endif

View file

@ -38,6 +38,8 @@ INCLUDES
#include "FGGroundReactions.h" #include "FGGroundReactions.h"
#include "FGPropertyManager.h" #include "FGPropertyManager.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_GROUNDREACTIONS; static const char *IdHdr = ID_GROUNDREACTIONS;
@ -269,4 +271,4 @@ void FGGroundReactions::Debug(int from)
} }
} }
} }
}

View file

@ -65,6 +65,8 @@ INCLUDES
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGGroundReactions : public FGModel class FGGroundReactions : public FGModel
{ {
public: public:
@ -100,7 +102,7 @@ private:
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -39,6 +39,8 @@ INCLUDES
#include "FGPosition.h" #include "FGPosition.h"
#include "FGMassBalance.h" #include "FGMassBalance.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_INERTIAL; static const char *IdHdr = ID_INERTIAL;
@ -190,4 +192,4 @@ void FGInertial::Debug(int from)
} }
} }
} }
}

View file

@ -66,6 +66,8 @@ CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGInertial : public FGModel { class FGInertial : public FGModel {
public: public:
@ -101,7 +103,7 @@ private:
double GM; double GM;
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -57,6 +57,8 @@ INCLUDES
#include "FGConfigFile.h" #include "FGConfigFile.h"
#include "FGPropertyManager.h" #include "FGPropertyManager.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_INITIALCONDITION; static const char *IdHdr = ID_INITIALCONDITION;
@ -1021,4 +1023,4 @@ void FGInitialCondition::Debug(int from)
} }
} }
} }
}

View file

@ -60,6 +60,8 @@ DEFINITIONS
#define ID_INITIALCONDITION "$Id$" #define ID_INITIALCONDITION "$Id$"
namespace JSBSim {
typedef enum { setvt, setvc, setve, setmach, setuvw, setned, setvg } speedset; typedef enum { setvt, setvc, setve, setmach, setuvw, setned, setvg } speedset;
typedef enum { setwned, setwmd, setwhc } windset; typedef enum { setwned, setwmd, setwhc } windset;
@ -301,6 +303,6 @@ private:
bool solve(double *y, double x); bool solve(double *y, double x);
void Debug(int from); void Debug(int from);
}; };
}
#endif #endif

View file

@ -37,6 +37,8 @@ INCLUDES
#include "FGJSBBase.h" #include "FGJSBBase.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_JSBBASE; static const char *IdHdr = ID_JSBBASE;
@ -67,7 +69,7 @@ const double FGJSBBase::in3tom3 = 1.638706E-5;
const double FGJSBBase::Reng = 1716.0; const double FGJSBBase::Reng = 1716.0;
const double FGJSBBase::SHRatio = 1.40; const double FGJSBBase::SHRatio = 1.40;
const string FGJSBBase::needed_cfg_version = "1.60"; const string FGJSBBase::needed_cfg_version = "1.60";
const string FGJSBBase::JSBSim_version = "0.9.2"; const string FGJSBBase::JSBSim_version = "0.9.4";
queue <FGJSBBase::Message*> FGJSBBase::Messages; queue <FGJSBBase::Message*> FGJSBBase::Messages;
FGJSBBase::Message FGJSBBase::localMsg; FGJSBBase::Message FGJSBBase::localMsg;
@ -183,4 +185,5 @@ void FGJSBBase::disableHighLighting(void) {
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
} // namespace JSBSim

View file

@ -105,6 +105,8 @@ CLASS DOCUMENTATION
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGJSBBase { class FGJSBBase {
public: public:
/// Constructor for FGJSBBase. /// Constructor for FGJSBBase.
@ -231,7 +233,7 @@ protected:
static const string needed_cfg_version; static const string needed_cfg_version;
static const string JSBSim_version; static const string JSBSim_version;
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -41,6 +41,8 @@ INCLUDES
#include "FGLGear.h" #include "FGLGear.h"
#include <algorithm> #include <algorithm>
namespace JSBSim {
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS DEFINITIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@ -49,7 +51,6 @@ DEFINITIONS
GLOBAL DATA GLOBAL DATA
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_LGEAR; static const char *IdHdr = ID_LGEAR;
@ -107,8 +108,9 @@ FGLGear::FGLGear(FGConfigFile* AC_cfg, FGFDMExec* fdmex) : Exec(fdmex)
WOW = lastWOW = true; // should the value be initialized to true? WOW = lastWOW = true; // should the value be initialized to true?
ReportEnable = true; ReportEnable = true;
FirstContact = false; FirstContact = false;
Reported = false; StartedGroundRun = false;
DistanceTraveled = 0.0; TakeoffReported = LandingReported = false;
LandingDistanceTraveled = TakeoffDistanceTraveled = TakeoffDistanceTraveled50ft = 0.0;
MaximumStrutForce = MaximumStrutTravel = 0.0; MaximumStrutForce = MaximumStrutTravel = 0.0;
SinkRate = GroundSpeed = 0.0; SinkRate = GroundSpeed = 0.0;
@ -154,7 +156,10 @@ FGLGear::FGLGear(const FGLGear& lgear)
lastWOW = lgear.lastWOW; lastWOW = lgear.lastWOW;
ReportEnable = lgear.ReportEnable; ReportEnable = lgear.ReportEnable;
FirstContact = lgear.FirstContact; FirstContact = lgear.FirstContact;
DistanceTraveled = lgear.DistanceTraveled; StartedGroundRun = lgear.StartedGroundRun;
LandingDistanceTraveled = lgear.LandingDistanceTraveled;
TakeoffDistanceTraveled = lgear.TakeoffDistanceTraveled;
TakeoffDistanceTraveled50ft = lgear.TakeoffDistanceTraveled50ft;
MaximumStrutForce = lgear.MaximumStrutForce; MaximumStrutForce = lgear.MaximumStrutForce;
MaximumStrutTravel = lgear.MaximumStrutTravel; MaximumStrutTravel = lgear.MaximumStrutTravel;
@ -169,7 +174,8 @@ FGLGear::FGLGear(const FGLGear& lgear)
maxCompLen = lgear.maxCompLen; maxCompLen = lgear.maxCompLen;
SinkRate = lgear.SinkRate; SinkRate = lgear.SinkRate;
GroundSpeed = lgear.GroundSpeed; GroundSpeed = lgear.GroundSpeed;
Reported = lgear.Reported; LandingReported = lgear.LandingReported;
TakeoffReported = lgear.TakeoffReported;
name = lgear.name; name = lgear.name;
sSteerType = lgear.sSteerType; sSteerType = lgear.sSteerType;
sRetractable = lgear.sRetractable; sRetractable = lgear.sRetractable;
@ -197,6 +203,7 @@ FGColumnVector3& FGLGear::Force(void)
{ {
double SteerGain = 0; double SteerGain = 0;
double SinWheel, CosWheel; double SinWheel, CosWheel;
double deltaT;
vForce.InitMatrix(); vForce.InitMatrix();
vMoment.InitMatrix(); vMoment.InitMatrix();
@ -264,6 +271,19 @@ FGColumnVector3& FGLGear::Force(void)
FirstContact = true; FirstContact = true;
SinkRate = compressSpeed; SinkRate = compressSpeed;
GroundSpeed = Position->GetVel().Magnitude(); GroundSpeed = Position->GetVel().Magnitude();
TakeoffReported = false;
}
// If the takeoff run is starting, initialize.
if ((Position->GetVel().Magnitude() > 0.1) &&
(FCS->GetBrake(bgLeft) == 0) &&
(FCS->GetBrake(bgRight) == 0) &&
(FCS->GetThrottlePos(0) == 1) && !StartedGroundRun)
{
TakeoffDistanceTraveled = 0;
TakeoffDistanceTraveled50ft = 0;
StartedGroundRun = true;
} }
// The following needs work regarding friction coefficients and braking and // The following needs work regarding friction coefficients and braking and
@ -412,20 +432,32 @@ FGColumnVector3& FGLGear::Force(void)
if (Position->GetDistanceAGL() > 200.0) { if (Position->GetDistanceAGL() > 200.0) {
FirstContact = false; FirstContact = false;
Reported = false; StartedGroundRun = false;
DistanceTraveled = 0.0; LandingReported = false;
LandingDistanceTraveled = 0.0;
MaximumStrutForce = MaximumStrutTravel = 0.0; MaximumStrutForce = MaximumStrutTravel = 0.0;
} }
compressLength = 0.0; // reset compressLength to zero for data output validity compressLength = 0.0; // reset compressLength to zero for data output validity
} }
if (FirstContact) { deltaT = State->Getdt()*Aircraft->GetRate();
DistanceTraveled += Position->GetVel().Magnitude()*State->Getdt()*Aircraft->GetRate();
} if (FirstContact) LandingDistanceTraveled += Position->GetVground()*deltaT;
if (ReportEnable && Position->GetVel().Magnitude() <= 0.05 && !Reported) { if (StartedGroundRun) {
if (debug_lvl > 0) Report(); TakeoffDistanceTraveled50ft += Position->GetVground()*deltaT;
if (WOW) TakeoffDistanceTraveled += Position->GetVground()*deltaT;
}
if (ReportEnable && Position->GetVground() <= 0.05 && !LandingReported) {
if (debug_lvl > 0) Report(erLand);
}
if (ReportEnable && !TakeoffReported &&
(vLocalGear(eZ) - Position->GetDistanceAGL()) < -50.0)
{
if (debug_lvl > 0) Report(erTakeoff);
} }
if (lastWOW != WOW) { if (lastWOW != WOW) {
@ -450,20 +482,32 @@ FGColumnVector3& FGLGear::Force(void)
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void FGLGear::Report(void) void FGLGear::Report(ReportType repType)
{ {
cout << endl << "Touchdown report for " << name << endl; switch(repType) {
cout << " Sink rate at contact: " << SinkRate << " fps, " case erLand:
<< SinkRate*0.3408 << " mps" << endl; cout << endl << "Touchdown report for " << name << endl;
cout << " Contact ground speed: " << GroundSpeed*.5925 << " knots, " cout << " Sink rate at contact: " << SinkRate << " fps, "
<< GroundSpeed*0.3408 << " mps" << endl; << SinkRate*0.3408 << " mps" << endl;
cout << " Maximum contact force: " << MaximumStrutForce << " lbs, " cout << " Contact ground speed: " << GroundSpeed*.5925 << " knots, "
<< MaximumStrutForce*4.448 << " Newtons" << endl; << GroundSpeed*0.3408 << " mps" << endl;
cout << " Maximum strut travel: " << MaximumStrutTravel*12.0 << " inches, " cout << " Maximum contact force: " << MaximumStrutForce << " lbs, "
<< MaximumStrutTravel*30.48 << " cm" << endl; << MaximumStrutForce*4.448 << " Newtons" << endl;
cout << " Distance traveled: " << DistanceTraveled << " ft, " cout << " Maximum strut travel: " << MaximumStrutTravel*12.0 << " inches, "
<< DistanceTraveled*0.3408 << " meters" << endl; << MaximumStrutTravel*30.48 << " cm" << endl;
Reported = true; cout << " Distance traveled: " << LandingDistanceTraveled << " ft, "
<< LandingDistanceTraveled*0.3408 << " meters" << endl;
LandingReported = true;
break;
case erTakeoff:
cout << endl << "Takeoff report for " << name << endl;
cout << " Distance traveled: " << TakeoffDistanceTraveled
<< " ft, " << TakeoffDistanceTraveled*0.3408 << " meters" << endl;
cout << " Distance traveled (over 50'): " << TakeoffDistanceTraveled50ft
<< " ft, " << TakeoffDistanceTraveled50ft*0.3408 << " meters" << endl;
TakeoffReported = true;
break;
}
} }
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -522,3 +566,5 @@ void FGLGear::Debug(int from)
} }
} }
} // namespace JSBSim

View file

@ -60,6 +60,8 @@ DEFINITIONS
FORWARD DECLARATIONS FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGAircraft; class FGAircraft;
class FGPosition; class FGPosition;
class FGRotation; class FGRotation;
@ -186,6 +188,8 @@ public:
enum BrakeGroup {bgNone=0, bgLeft, bgRight, bgCenter, bgNose, bgTail }; enum BrakeGroup {bgNone=0, bgLeft, bgRight, bgCenter, bgNose, bgTail };
/// Steering group membership enumerators /// Steering group membership enumerators
enum SteerType {stSteer, stFixed, stCaster}; enum SteerType {stSteer, stFixed, stCaster};
/// Report type enumerators
enum ReportType {erNone=0, erTakeoff, erLand};
/** Constructor /** Constructor
@param Executive a pointer to the parent executive object @param Executive a pointer to the parent executive object
@param File a pointer to the config file instance */ @param File a pointer to the config file instance */
@ -265,7 +269,9 @@ private:
double maxCompLen; double maxCompLen;
double SinkRate; double SinkRate;
double GroundSpeed; double GroundSpeed;
double DistanceTraveled; double TakeoffDistanceTraveled;
double TakeoffDistanceTraveled50ft;
double LandingDistanceTraveled;
double MaximumStrutForce; double MaximumStrutForce;
double MaximumStrutTravel; double MaximumStrutTravel;
double SideWhlVel, RollingWhlVel; double SideWhlVel, RollingWhlVel;
@ -275,7 +281,9 @@ private:
bool WOW; bool WOW;
bool lastWOW; bool lastWOW;
bool FirstContact; bool FirstContact;
bool Reported; bool StartedGroundRun;
bool LandingReported;
bool TakeoffReported;
bool ReportEnable; bool ReportEnable;
bool isRetractable; bool isRetractable;
bool GearUp, GearDown; bool GearUp, GearDown;
@ -296,10 +304,10 @@ private:
FGFCS* FCS; FGFCS* FCS;
FGMassBalance* MassBalance; FGMassBalance* MassBalance;
void Report(void); void Report(ReportType rt);
void Debug(int from); void Debug(int from);
}; };
}
#include "FGAircraft.h" #include "FGAircraft.h"
#include "FGPosition.h" #include "FGPosition.h"
#include "FGRotation.h" #include "FGRotation.h"

View file

@ -41,6 +41,8 @@ INCLUDES
#include "FGMassBalance.h" #include "FGMassBalance.h"
#include "FGPropertyManager.h" #include "FGPropertyManager.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_MASSBALANCE; static const char *IdHdr = ID_MASSBALANCE;
@ -290,4 +292,4 @@ void FGMassBalance::Debug(int from)
} }
} }
} }
}

View file

@ -52,6 +52,8 @@ INCLUDES
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGMassBalance : public FGModel class FGMassBalance : public FGModel
{ {
@ -113,6 +115,6 @@ private:
FGColumnVector3 PointMassCG; FGColumnVector3 PointMassCG;
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -21,6 +21,8 @@ INCLUDES
#include "FGMatrix33.h" #include "FGMatrix33.h"
#include "FGColumnVector3.h" #include "FGColumnVector3.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_MATRIX33; static const char *IdHdr = ID_MATRIX33;
@ -440,4 +442,4 @@ void FGMatrix33::Debug(int from)
} }
} }
} }
}

View file

@ -65,6 +65,8 @@ DEFINITIONS
FORWARD DECLARATIONS FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGColumnVector3; class FGColumnVector3;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -128,5 +130,5 @@ private:
unsigned int rowCtr, colCtr; unsigned int rowCtr, colCtr;
void Debug(int from); void Debug(int from);
}; };
}
#endif #endif

View file

@ -55,6 +55,8 @@ INCLUDES
#include "FGAuxiliary.h" #include "FGAuxiliary.h"
#include "FGOutput.h" #include "FGOutput.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_MODEL; static const char *IdHdr = ID_MODEL;
@ -199,4 +201,4 @@ void FGModel::Debug(int from)
} }
} }
} }
}

View file

@ -70,6 +70,8 @@ using namespace std;
FORWARD DECLARATIONS FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGFDMExec; class FGFDMExec;
class FGState; class FGState;
class FGAtmosphere; class FGAtmosphere;
@ -157,7 +159,7 @@ protected:
FGOutput* Output; FGOutput* Output;
FGPropertyManager* PropertyManager; FGPropertyManager* PropertyManager;
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -44,6 +44,8 @@ INCLUDES
#include "FGNozzle.h" #include "FGNozzle.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_NOZZLE; static const char *IdHdr = ID_NOZZLE;
@ -149,4 +151,4 @@ void FGNozzle::Debug(int from)
} }
} }
} }
}

View file

@ -69,6 +69,8 @@ CLASS DOCUMENTATION
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGNozzle : public FGThruster { class FGNozzle : public FGThruster {
public: public:
@ -89,7 +91,7 @@ private:
double Area2; double Area2;
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -52,6 +52,8 @@ INCLUDES
#include "FGPosition.h" #include "FGPosition.h"
#include "FGAuxiliary.h" #include "FGAuxiliary.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_OUTPUT; static const char *IdHdr = ID_OUTPUT;
@ -557,4 +559,4 @@ void FGOutput::Debug(int from)
} }
} }
} }
}

View file

@ -62,6 +62,8 @@ INCLUDES
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGOutput : public FGModel class FGOutput : public FGModel
{ {
public: public:
@ -107,7 +109,7 @@ private:
FGfdmSocket* socket; FGfdmSocket* socket;
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -42,6 +42,8 @@ INCLUDES
#include "FGPiston.h" #include "FGPiston.h"
#include "FGPropulsion.h" #include "FGPropulsion.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_PISTON; static const char *IdHdr = ID_PISTON;
@ -569,3 +571,5 @@ FGPiston::CalcFuelNeed(void)
{ {
return FuelFlow_gph / 3600 * 6 * State->Getdt() * Propulsion->GetRate(); return FuelFlow_gph / 3600 * 6 * State->Getdt() * Propulsion->GetRate();
} }
} // namespace JSBSim

View file

@ -80,6 +80,8 @@ DOCUMENTATION
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGPiston : public FGEngine class FGPiston : public FGEngine
{ {
public: public:
@ -162,6 +164,6 @@ private:
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -86,6 +86,8 @@ INCLUDES
#include "FGPropertyManager.h" #include "FGPropertyManager.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_POSITION; static const char *IdHdr = ID_POSITION;
@ -348,4 +350,4 @@ void FGPosition::Debug(int from)
} }
} }
} }
}

View file

@ -74,6 +74,8 @@ DOCUMENTATION
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGPosition : public FGModel { class FGPosition : public FGModel {
public: public:
/** Constructor /** Constructor
@ -148,7 +150,7 @@ private:
void GetState(void); void GetState(void);
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -38,6 +38,8 @@ INCLUDES
#include "FGPropeller.h" #include "FGPropeller.h"
#include "FGFCS.h" #include "FGFCS.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_PROPELLER; static const char *IdHdr = ID_PROPELLER;
@ -293,4 +295,4 @@ void FGPropeller::Debug(int from)
} }
} }
} }
}

View file

@ -91,6 +91,8 @@ CLASS DOCUMENTATION
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGPropeller : public FGThruster { class FGPropeller : public FGThruster {
public: public:
@ -178,7 +180,7 @@ private:
FGTable *cPower; FGTable *cPower;
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -47,6 +47,8 @@ COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
*/ */
namespace JSBSim {
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
string FGPropertyManager::mkPropertyName(string name, bool lowercase) { string FGPropertyManager::mkPropertyName(string name, bool lowercase) {
@ -312,3 +314,5 @@ void FGPropertyManager::Tie (const string &name, double *pointer,
cout << cout <<
"Failed to tie property " << name << " to a pointer" << endl; "Failed to tie property " << name << " to a pointer" << endl;
} }
} // namespace JSBSim

View file

@ -70,6 +70,8 @@ CLASS DOCUMENTATION
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGPropertyManager : public SGPropertyNode { class FGPropertyManager : public SGPropertyNode {
public: public:
/// Constructor /// Constructor
@ -608,6 +610,6 @@ class FGPropertyManager : public SGPropertyNode {
"Failed to tie property " << name << " to indexed object methods" << endl; "Failed to tie property " << name << " to indexed object methods" << endl;
} }
}; };
}
#endif // FGPROPERTYMANAGER_H #endif // FGPROPERTYMANAGER_H

View file

@ -55,12 +55,6 @@ INCLUDES
#include "FGPropulsion.h" #include "FGPropulsion.h"
#include "FGPropertyManager.h" #include "FGPropertyManager.h"
static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_PROPULSION;
extern short debug_lvl;
#if defined (__APPLE__) #if defined (__APPLE__)
/* Not all systems have the gcvt function */ /* Not all systems have the gcvt function */
inline char* gcvt (double value, int ndigits, char *buf) { inline char* gcvt (double value, int ndigits, char *buf) {
@ -70,6 +64,13 @@ inline char* gcvt (double value, int ndigits, char *buf) {
} }
#endif #endif
namespace JSBSim {
static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_PROPULSION;
extern short debug_lvl;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS IMPLEMENTATION CLASS IMPLEMENTATION
@ -702,4 +703,4 @@ void FGPropulsion::Debug(int from)
} }
} }
} }
}

View file

@ -98,6 +98,8 @@ CLASS DOCUMENTATION
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGPropulsion : public FGModel class FGPropulsion : public FGModel
{ {
public: public:
@ -216,7 +218,7 @@ private:
FGColumnVector3 vXYZtank; FGColumnVector3 vXYZtank;
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -40,6 +40,8 @@ INCLUDES
#include "FGRocket.h" #include "FGRocket.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_ROCKET; static const char *IdHdr = ID_ROCKET;
@ -160,4 +162,4 @@ void FGRocket::Debug(int from)
} }
} }
} }
}

View file

@ -104,6 +104,8 @@ CLASS DOCUMENTATION
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGRocket : public FGEngine class FGRocket : public FGEngine
{ {
public: public:
@ -135,7 +137,7 @@ private:
double PC; double PC;
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -69,6 +69,8 @@ INCLUDES
#include "FGPropertyManager.h" #include "FGPropertyManager.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_ROTATION; static const char *IdHdr = ID_ROTATION;
@ -279,4 +281,4 @@ void FGRotation::Debug(int from)
} }
} }
} }
}

View file

@ -78,6 +78,8 @@ INCLUDES
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGRotation : public FGModel class FGRotation : public FGModel
{ {
public: public:
@ -141,7 +143,7 @@ private:
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -37,6 +37,8 @@ INCLUDES
#include "FGRotor.h" #include "FGRotor.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_ROTOR; static const char *IdHdr = ID_ROTOR;
@ -109,4 +111,4 @@ void FGRotor::Debug(int from)
} }
} }
} }
}

View file

@ -50,6 +50,8 @@ INCLUDES
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGRotor : public FGThruster { class FGRotor : public FGThruster {
public: public:
@ -61,6 +63,6 @@ public:
private: private:
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -57,6 +57,8 @@ INCLUDES
#include "FGScript.h" #include "FGScript.h"
#include "FGConfigFile.h" #include "FGConfigFile.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_FGSCRIPT; static const char *IdHdr = ID_FGSCRIPT;
@ -415,4 +417,4 @@ void FGScript::Debug(int from)
} }
} }
} }
}

View file

@ -133,6 +133,8 @@ CLASS DOCUMENTATION
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGScript : public FGJSBBase class FGScript : public FGJSBBase
{ {
public: public:
@ -198,7 +200,7 @@ private:
FGPropertyManager* PropertyManager; FGPropertyManager* PropertyManager;
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -53,6 +53,8 @@ INCLUDES
#include "FGState.h" #include "FGState.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_STATE; static const char *IdHdr = ID_STATE;
@ -477,4 +479,4 @@ void FGState::Debug(int from)
} }
} }
} }
}

View file

@ -108,6 +108,8 @@ CLASS DOCUMENTATION
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGState : public FGJSBBase class FGState : public FGJSBBase
{ {
public: public:
@ -362,7 +364,7 @@ private:
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View file

@ -44,6 +44,10 @@ INCLUDES
#include <iomanip> #include <iomanip>
#endif #endif
using namespace std;
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_TABLE; static const char *IdHdr = ID_TABLE;
@ -51,7 +55,6 @@ static const char *IdHdr = ID_TABLE;
CLASS IMPLEMENTATION CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
using namespace std;
FGTable::FGTable(int NRows, int NCols) : nRows(NRows), nCols(NCols) FGTable::FGTable(int NRows, int NCols) : nRows(NRows), nCols(NCols)
{ {
@ -313,6 +316,4 @@ void FGTable::Debug(int from)
} }
} }
} }
}

View file

@ -76,6 +76,8 @@ CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGTable : public FGJSBBase class FGTable : public FGJSBBase
{ {
public: public:
@ -111,7 +113,7 @@ private:
double** Allocate(void); double** Allocate(void);
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -38,6 +38,14 @@ INCLUDES
#include "FGTank.h" #include "FGTank.h"
#if !defined ( sgi ) || defined( __GNUC__ )
using std::cerr;
using std::endl;
using std::cout;
#endif
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_TANK; static const char *IdHdr = ID_TANK;
@ -45,12 +53,6 @@ static const char *IdHdr = ID_TANK;
CLASS IMPLEMENTATION CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#if !defined ( sgi ) || defined( __GNUC__ )
using std::cerr;
using std::endl;
using std::cout;
#endif
FGTank::FGTank(FGConfigFile* AC_cfg) FGTank::FGTank(FGConfigFile* AC_cfg)
{ {
string token; string token;
@ -156,4 +158,4 @@ void FGTank::Debug(int from)
} }
} }
} }
}

View file

@ -74,6 +74,8 @@ DEFINES
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGTank : public FGJSBBase class FGTank : public FGJSBBase
{ {
public: public:
@ -104,7 +106,7 @@ private:
bool Selected; bool Selected;
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -37,6 +37,8 @@ INCLUDES
#include "FGThruster.h" #include "FGThruster.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_THRUSTER; static const char *IdHdr = ID_THRUSTER;
@ -115,4 +117,4 @@ void FGThruster::Debug(int from)
} }
} }
} }
}

View file

@ -64,6 +64,8 @@ CLASS DOCUMENTATION
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGThruster : public FGForce { class FGThruster : public FGForce {
public: public:
@ -96,7 +98,7 @@ protected:
double deltaT; double deltaT;
virtual void Debug(int from); virtual void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -70,6 +70,8 @@ INCLUDES
#include "FGOutput.h" #include "FGOutput.h"
#include "FGPropertyManager.h" #include "FGPropertyManager.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_TRANSLATION; static const char *IdHdr = ID_TRANSLATION;
@ -322,4 +324,4 @@ void FGTranslation::Debug(int from)
} }
} }
} }
}

View file

@ -82,40 +82,100 @@ INCLUDES
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGTranslation : public FGModel { class FGTranslation : public FGModel {
public: public:
FGTranslation(FGFDMExec*); FGTranslation(FGFDMExec*);
~FGTranslation(); ~FGTranslation();
/** Bound Properties
GetUVW(1): velocities/u-fps
GetUVW(2): velocities/v-fps
GetUVW(3): velocities/w-fps
*/
inline double GetUVW (int idx) const { return vUVW(idx); } inline double GetUVW (int idx) const { return vUVW(idx); }
inline FGColumnVector3& GetUVW (void) { return vUVW; } inline FGColumnVector3& GetUVW (void) { return vUVW; }
inline FGColumnVector3& GetUVWdot(void) { return vUVWdot; } inline FGColumnVector3& GetUVWdot(void) { return vUVWdot; }
/** Bound Properties
GetUVWdot(1): accelerations/udot-fps
GetUVWdot(2): accelerations/vdot-fps
GetUVWdot(3): accelerations/wdot-fps
*/
inline double GetUVWdot(int idx) const { return vUVWdot(idx); } inline double GetUVWdot(int idx) const { return vUVWdot(idx); }
inline FGColumnVector3& GetAeroUVW (void) { return vAeroUVW; } inline FGColumnVector3& GetAeroUVW (void) { return vAeroUVW; }
/** Bound Properties
GetAeroUVW(1): velocities/u-aero-fps
GetAeroUVW(2): velocities/v-aero-fps
GetAeroUVW(3): velocities/w-aero-fps
*/
inline double GetAeroUVW (int idx) const { return vAeroUVW(idx); } inline double GetAeroUVW (int idx) const { return vAeroUVW(idx); }
/** Bound Property: aero/alpha-rad
*/
double Getalpha(void) const { return alpha; } double Getalpha(void) const { return alpha; }
/** Bound Property: aero/beta-rad
*/
double Getbeta (void) const { return beta; } double Getbeta (void) const { return beta; }
/** Bound Property: aero/mag-beta-rad
*/
inline double GetMagBeta(void) const { return fabs(beta); } inline double GetMagBeta(void) const { return fabs(beta); }
/** Bound Property: aero/qbar-psf
*/
double Getqbar (void) const { return qbar; } double Getqbar (void) const { return qbar; }
/** Bound Property: aero/qbarUW-psf
*/
double GetqbarUW (void) const { return qbarUW; } double GetqbarUW (void) const { return qbarUW; }
/** Bound Property: aero/qbarUV-psf
*/
double GetqbarUV (void) const { return qbarUV; } double GetqbarUV (void) const { return qbarUV; }
/** Bound Property: velocities/vt-fps
*/
inline double GetVt (void) const { return Vt; } inline double GetVt (void) const { return Vt; }
/** Bound Property: velocities/mach-norm
*/
double GetMach (void) const { return Mach; } double GetMach (void) const { return Mach; }
/** Bound Property: aero/alphadot-rad_sec
*/
double Getadot (void) const { return adot; } double Getadot (void) const { return adot; }
/** Bound Property: aero/betadot-rad_sec
*/
double Getbdot (void) const { return bdot; } double Getbdot (void) const { return bdot; }
/** Bound Properties
SetUVW(1): velocities/u-fps
SetUVW(2): velocities/v-fps
SetUVW(3): velocities/w-fps
*/
void SetUVW(FGColumnVector3 tt) { vUVW = tt; } void SetUVW(FGColumnVector3 tt) { vUVW = tt; }
void SetAeroUVW(FGColumnVector3 tt) { vAeroUVW = tt; } void SetAeroUVW(FGColumnVector3 tt) { vAeroUVW = tt; }
/** Bound Property: aero/alpha-rad
*/
inline void Setalpha(double tt) { alpha = tt; } inline void Setalpha(double tt) { alpha = tt; }
/** Bound Property: aero/beta-rad
*/
inline void Setbeta (double tt) { beta = tt; } inline void Setbeta (double tt) { beta = tt; }
/** Bound Property: aero/qbar-psf
*/
inline void Setqbar (double tt) { qbar = tt; } inline void Setqbar (double tt) { qbar = tt; }
/** Bound Property: aero/qbarUW-psf
*/
inline void SetqbarUW (double tt) { qbarUW = tt; } inline void SetqbarUW (double tt) { qbarUW = tt; }
/** Bound Property: aero/qbarUV-psf
*/
inline void SetqbarUV (double tt) { qbarUV = tt; } inline void SetqbarUV (double tt) { qbarUV = tt; }
/** Bound Property: velocities/vt-fps
*/
inline void SetVt (double tt) { Vt = tt; } inline void SetVt (double tt) { Vt = tt; }
/** Bound Property: velocities/mach-norm
*/
inline void SetMach (double tt) { Mach=tt; } inline void SetMach (double tt) { Mach=tt; }
/** Bound Property: aero/alphadot-rad_sec
*/
inline void Setadot (double tt) { adot = tt; } inline void Setadot (double tt) { adot = tt; }
/** Bound Property: aero/betadot-rad_sec
*/
inline void Setbdot (double tt) { bdot = tt; } inline void Setbdot (double tt) { bdot = tt; }
inline void SetAB(double t1, double t2) { alpha=t1; beta=t2; } inline void SetAB(double t1, double t2) { alpha=t1; beta=t2; }
@ -139,7 +199,7 @@ private:
double adot,bdot; double adot,bdot;
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -58,6 +58,8 @@ INCLUDES
#pragma warning (disable : 4786 4788) #pragma warning (disable : 4786 4788)
#endif #endif
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_TRIM; static const char *IdHdr = ID_TRIM;
@ -665,4 +667,4 @@ void FGTrim::SetMode(TrimMode tt) {
current_axis=0; current_axis=0;
} }
//YOU WERE WARNED, BUT YOU DID IT ANYWAY. //YOU WERE WARNED, BUT YOU DID IT ANYWAY.
}

View file

@ -62,14 +62,16 @@ DEFINITIONS
#define ID_TRIM "$Id$" #define ID_TRIM "$Id$"
typedef enum { tLongitudinal, tFull, tGround, tPullup,
tCustom, tNone, tTurn
} TrimMode;
#if defined(_WIN32) && !defined(__CYGWIN__) #if defined(_WIN32) && !defined(__CYGWIN__)
#define snprintf _snprintf #define snprintf _snprintf
#endif #endif
namespace JSBSim {
typedef enum { tLongitudinal, tFull, tGround, tPullup,
tCustom, tNone, tTurn
} TrimMode;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FORWARD DECLARATIONS FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@ -302,15 +304,6 @@ public:
inline double GetTargetNlf(void) { return targetNlf; } inline double GetTargetNlf(void) { return targetNlf; }
}; };
}
#endif #endif

View file

@ -48,6 +48,8 @@ INCLUDES
#include "FGAerodynamics.h" #include "FGAerodynamics.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_TRIMAXIS; static const char *IdHdr = ID_TRIMAXIS;
@ -482,5 +484,4 @@ void FGTrimAxis::Debug(int from)
} }
} }
} }
}

View file

@ -48,6 +48,8 @@ INCLUDES
#define DEFAULT_TOLERANCE 0.001 #define DEFAULT_TOLERANCE 0.001
namespace JSBSim {
const string StateNames[10]= { "all","udot","vdot","wdot","qdot","pdot","rdot", const string StateNames[10]= { "all","udot","vdot","wdot","qdot","pdot","rdot",
"hmgt","nlf" "hmgt","nlf"
}; };
@ -165,5 +167,5 @@ private:
void Debug(int from); void Debug(int from);
}; };
}
#endif #endif

View file

@ -42,6 +42,8 @@ INCLUDES
#include "FGTurbine.h" #include "FGTurbine.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_TURBINE; static const char *IdHdr = ID_TURBINE;
@ -251,4 +253,4 @@ void FGTurbine::Debug(int from)
} }
} }
} }
}

View file

@ -53,6 +53,8 @@ INCLUDES
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGTurbine : public FGEngine class FGTurbine : public FGEngine
{ {
public: public:
@ -88,7 +90,7 @@ private:
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -61,6 +61,8 @@ INCLUDES
#include "FGState.h" #include "FGState.h"
#include "FGFDMExec.h" #include "FGFDMExec.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_UTILITY; static const char *IdHdr = ID_UTILITY;
@ -125,4 +127,4 @@ void FGUtility::Debug(int from)
} }
} }
} }
}

View file

@ -50,6 +50,8 @@ DEFINES
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGFDMExec; class FGFDMExec;
class FGState; class FGState;
@ -64,6 +66,6 @@ private:
FGFDMExec* FDMExec; FGFDMExec* FDMExec;
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -39,6 +39,8 @@ INCLUDES
#include "FGfdmSocket.h" #include "FGfdmSocket.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_FDMSOCKET; static const char *IdHdr = ID_FDMSOCKET;
@ -204,4 +206,4 @@ void FGfdmSocket::Debug(int from)
} }
} }
} }
}

View file

@ -88,6 +88,8 @@ CLASS DECLARATION
using std::string; using std::string;
namespace JSBSim {
class FGfdmSocket : public FGJSBBase class FGfdmSocket : public FGJSBBase
{ {
public: public:
@ -109,5 +111,5 @@ private:
bool connected; bool connected;
void Debug(int from); void Debug(int from);
}; };
}
#endif #endif

View file

@ -796,3 +796,4 @@ void FGJSBsim::update_ic(void) {
fgic->SetClimbRateFpsIC( get_Climb_Rate() ); fgic->SetClimbRateFpsIC( get_Climb_Rate() );
} }
} }

View file

@ -57,6 +57,7 @@ FORWARD DECLARATIONS
#include <FDM/JSBSim/FGFDMExec.h> #include <FDM/JSBSim/FGFDMExec.h>
namespace JSBSim {
class FGState; class FGState;
class FGAtmosphere; class FGAtmosphere;
class FGFCS; class FGFCS;
@ -71,6 +72,9 @@ class FGPosition;
class FGAuxiliary; class FGAuxiliary;
class FGOutput; class FGOutput;
class FGInitialCondition; class FGInitialCondition;
}
using namespace JSBSim;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs] COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]

View file

@ -41,9 +41,7 @@ libJSBSim_a_SOURCES = \
FGTranslation.cpp FGTranslation.h \ FGTranslation.cpp FGTranslation.h \
FGTrim.cpp FGTrim.h \ FGTrim.cpp FGTrim.h \
FGTrimAxis.cpp FGTrimAxis.h \ FGTrimAxis.cpp FGTrimAxis.h \
FGTurboJet.cpp FGTurboJet.h \ FGTurbine.cpp FGTurbine.h \
FGTurboProp.cpp FGTurboProp.h \
FGTurboShaft.cpp FGTurboShaft.h \
FGUtility.cpp FGUtility.h \ FGUtility.cpp FGUtility.h \
FGEngine.cpp FGEngine.h \ FGEngine.cpp FGEngine.h \
FGTank.cpp FGTank.h \ FGTank.cpp FGTank.h \

View file

@ -39,6 +39,8 @@ INCLUDES
#include "FGDeadBand.h" #include "FGDeadBand.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_DEADBAND; static const char *IdHdr = ID_DEADBAND;
@ -56,14 +58,30 @@ FGDeadBand::FGDeadBand(FGFCS* fcs, FGConfigFile* AC_cfg) : FGFCSComponent(fcs),
AC_cfg->GetNextConfigLine(); AC_cfg->GetNextConfigLine();
string token; string token;
clipmax = clipmin = 0.0;
clip = false;
gain = 1.0;
width = 0.0;
while ((token = AC_cfg->GetValue()) != string("/COMPONENT")) { while ((token = AC_cfg->GetValue()) != string("/COMPONENT")) {
*AC_cfg >> token; *AC_cfg >> token;
if (token == "ID") { if (token == "INPUT") {
*AC_cfg >> ID; if (InputNodes.size() > 0) {
} else if (token == "INPUT") { cerr << "Deadband can only accept one input" << endl;
*AC_cfg >> InputIdx; } else {
} else { *AC_cfg >> token;
InputNodes.push_back(resolveSymbol(token));
}
} else if (token == "WIDTH") {
*AC_cfg >> width;
} else if (token == "CLIPTO") {
*AC_cfg >> clipmin >> clipmax;
if (clipmax > clipmin) clip = true;
} else if (token == "GAIN") {
*AC_cfg >> gain;
} else if (token == "OUTPUT") {
*AC_cfg >> token; *AC_cfg >> token;
OutputNode = PropertyManager->GetNode(token);
} }
} }
FGFCSComponent::bind(); FGFCSComponent::bind();
@ -83,6 +101,23 @@ bool FGDeadBand::Run(void )
{ {
FGFCSComponent::Run(); // call the base class for initialization of Input FGFCSComponent::Run(); // call the base class for initialization of Input
Input = InputNodes[0]->getDoubleValue();
if (Input < -width/2.0) {
Output = (Input + width/2.0)*gain;
} else if (Input > width/2.0) {
Output = (Input - width/2.0)*gain;
} else {
Output = 0.0;
}
if (clip) {
if (Output > clipmax) Output = clipmax;
else if (Output < clipmin) Output = clipmin;
}
if (IsOutput) SetOutput();
return true; return true;
} }
@ -111,7 +146,12 @@ void FGDeadBand::Debug(int from)
if (debug_lvl & 1) { // Standard console startup message output if (debug_lvl & 1) { // Standard console startup message output
if (from == 0) { // Constructor if (from == 0) { // Constructor
cout << " INPUT: " << InputNodes[0]->getName() << endl;
cout << " DEADBAND WIDTH: " << width << endl;
cout << " GAIN: " << gain << endl;
if (clip) cout << " CLIPTO: " << clipmin
<< ", " << clipmax << endl;
if (IsOutput) cout << " OUTPUT: " << OutputNode->getName() << endl;
} }
} }
if (debug_lvl & 2 ) { // Instantiation/Destruction notification if (debug_lvl & 2 ) { // Instantiation/Destruction notification
@ -131,4 +171,4 @@ void FGDeadBand::Debug(int from)
} }
} }
} }
}

View file

@ -50,6 +50,8 @@ DEFINITIONS
FORWARD DECLARATIONS FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGFCS; class FGFCS;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -62,6 +64,16 @@ CLASS DOCUMENTATION
/** Models a deadband object. /** Models a deadband object.
Owned and Operated by the FGFCS class. Owned and Operated by the FGFCS class.
<COMPONENT NAME="Deadbeat1" TYPE="DEADBAND">
INPUT {input}
WIDTH {deadband width}
GAIN {optional deadband gain}
MIN {minimum value}
MAX {maximum value}
OUTPUT {optional output parameter to set}
</COMPONENT>
@author Jon S. Berndt @author Jon S. Berndt
@see - @see -
*/ */
@ -80,10 +92,14 @@ public:
private: private:
FGConfigFile* AC_cfg; FGConfigFile* AC_cfg;
double width;
double clipmax, clipmin;
bool clip;
double gain;
void Debug(int from); void Debug(int from);
}; };
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif #endif

View file

@ -39,6 +39,8 @@ INCLUDES
#include "FGFCSComponent.h" #include "FGFCSComponent.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_FCSCOMPONENT; static const char *IdHdr = ID_FCSCOMPONENT;
@ -49,7 +51,6 @@ CLASS IMPLEMENTATION
FGFCSComponent::FGFCSComponent(FGFCS* _fcs) : fcs(_fcs) FGFCSComponent::FGFCSComponent(FGFCS* _fcs) : fcs(_fcs)
{ {
Type = ""; Type = "";
ID = 0;
Input = 0.0; Input = 0.0;
Output = 0.0; Output = 0.0;
OutputNode = 0; OutputNode = 0;
@ -82,14 +83,14 @@ bool FGFCSComponent::Run(void)
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FGPropertyManager* FGFCSComponent::resolveSymbol(string token) { FGPropertyManager* FGFCSComponent::resolveSymbol(string token)
{
string prop; string prop;
FGPropertyManager* tmp=PropertyManager->GetNode(token,false); FGPropertyManager* tmp = PropertyManager->GetNode(token,false);
if( !tmp ){ if (!tmp) {
if( token.find("/") == token.npos ) if (token.find("/") == token.npos) prop = "model/" + token;
prop = "model/" + token;
cerr << "Creating new property " << prop << endl; cerr << "Creating new property " << prop << endl;
tmp=PropertyManager->GetNode(token,true); tmp = PropertyManager->GetNode(token,true);
} }
return tmp; return tmp;
} }
@ -97,7 +98,8 @@ FGPropertyManager* FGFCSComponent::resolveSymbol(string token) {
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
void FGFCSComponent::bind(void) { void FGFCSComponent::bind(void)
{
string tmp = "fcs/" + PropertyManager->mkPropertyName(Name, true); string tmp = "fcs/" + PropertyManager->mkPropertyName(Name, true);
FGPropertyManager *tmpn; FGPropertyManager *tmpn;
PropertyManager->Tie( tmp,this, &FGFCSComponent::GetOutput); PropertyManager->Tie( tmp,this, &FGFCSComponent::GetOutput);
@ -154,4 +156,4 @@ void FGFCSComponent::Debug(int from)
} }
} }
} }
}

View file

@ -59,6 +59,8 @@ using std::string;
FORWARD DECLARATIONS FORWARD DECLARATIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGFCS; class FGFCS;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -119,16 +121,14 @@ protected:
FGPropertyManager* treenode; FGPropertyManager* treenode;
string Type; string Type;
string Name; string Name;
int ID; vector <FGPropertyManager*> InputNodes;
vector<FGPropertyManager*> InputNodes;
int InputIdx;
double Input; double Input;
FGPropertyManager* OutputNode; FGPropertyManager* OutputNode;
double Output; double Output;
bool IsOutput; bool IsOutput;
virtual void Debug(int from); virtual void Debug(int from);
}; };
}
#include "../FGFCS.h" #include "../FGFCS.h"
#endif #endif

View file

@ -39,6 +39,8 @@ INCLUDES
#include "FGFilter.h" #include "FGFilter.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_FILTER; static const char *IdHdr = ID_FILTER;
@ -69,8 +71,7 @@ FGFilter::FGFilter(FGFCS* fcs, FGConfigFile* AC_cfg) : FGFCSComponent(fcs),
while ((token = AC_cfg->GetValue()) != string("/COMPONENT")) { while ((token = AC_cfg->GetValue()) != string("/COMPONENT")) {
*AC_cfg >> token; *AC_cfg >> token;
if (token == "ID") *AC_cfg >> ID; if (token == "C1") *AC_cfg >> C1;
else if (token == "C1") *AC_cfg >> C1;
else if (token == "C2") *AC_cfg >> C2; else if (token == "C2") *AC_cfg >> C2;
else if (token == "C3") *AC_cfg >> C3; else if (token == "C3") *AC_cfg >> C3;
else if (token == "C4") *AC_cfg >> C4; else if (token == "C4") *AC_cfg >> C4;
@ -239,4 +240,4 @@ void FGFilter::Debug(int from)
} }
} }
} }
}

View file

@ -69,7 +69,6 @@ CLASS DOCUMENTATION
<pre> <pre>
&ltCOMPONENT NAME="Elevator Filter" TYPE="LAG_FILTER"> &ltCOMPONENT NAME="Elevator Filter" TYPE="LAG_FILTER">
ID 16
INPUT 15 INPUT 15
C1 600 C1 600
OUTPUT FG_ELEVATOR_POS OUTPUT FG_ELEVATOR_POS
@ -87,6 +86,8 @@ CLASS DOCUMENTATION
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGFilter : public FGFCSComponent class FGFilter : public FGFCSComponent
{ {
public: public:
@ -121,6 +122,6 @@ private:
FGConfigFile* AC_cfg; FGConfigFile* AC_cfg;
void Debug(int from); void Debug(int from);
}; };
}
#endif #endif

View file

@ -39,6 +39,8 @@ INCLUDES
#include "FGGain.h" #include "FGGain.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_GAIN; static const char *IdHdr = ID_GAIN;
@ -69,11 +71,9 @@ FGGain::FGGain(FGFCS* fcs, FGConfigFile* AC_cfg) : FGFCSComponent(fcs),
while ((token = AC_cfg->GetValue()) != string("/COMPONENT")) { while ((token = AC_cfg->GetValue()) != string("/COMPONENT")) {
*AC_cfg >> token; *AC_cfg >> token;
if (token == "ID") { if (token == "INPUT") {
*AC_cfg >> ID;
} else if (token == "INPUT") {
token = AC_cfg->GetValue("INPUT"); token = AC_cfg->GetValue("INPUT");
if( InputNodes.size() > 0 ) { if (InputNodes.size() > 0) {
cerr << "Gains can only accept one input" << endl; cerr << "Gains can only accept one input" << endl;
} else { } else {
*AC_cfg >> token; *AC_cfg >> token;
@ -132,10 +132,10 @@ bool FGGain::Run(void )
Output = Gain * Input; Output = Gain * Input;
} else if (Type == "SCHEDULED_GAIN") { } else if (Type == "SCHEDULED_GAIN") {
LookupVal = ScheduledBy->getDoubleValue(); LookupVal = ScheduledBy->getDoubleValue();
SchedGain = Table->GetValue(LookupVal); SchedGain = Table->GetValue(LookupVal);
Output = Gain * SchedGain * Input; Output = Gain * SchedGain * Input;
} else if (Type == "AEROSURFACE_SCALE") { } else if (Type == "AEROSURFACE_SCALE") {
if(!invert) { if (!invert) {
OutputPct = Input; OutputPct = Input;
if (Input >= 0.0) Output = Input * Max; if (Input >= 0.0) Output = Input * Max;
else Output = Input * -Min; else Output = Input * -Min;
@ -206,4 +206,4 @@ void FGGain::Debug(int from)
} }
} }
} }
}

View file

@ -60,6 +60,8 @@ DEFINES
#define ID_GAIN "$Id$" #define ID_GAIN "$Id$"
namespace JSBSim {
class FGFCS; class FGFCS;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -89,5 +91,5 @@ private:
void Debug(int from); void Debug(int from);
}; };
}
#endif #endif

View file

@ -39,6 +39,8 @@ INCLUDES
#include "FGGradient.h" #include "FGGradient.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_GRADIENT; static const char *IdHdr = ID_GRADIENT;
@ -119,4 +121,4 @@ void FGGradient::Debug(int from)
} }
} }
} }
}

View file

@ -50,6 +50,8 @@ DEFINES
#define ID_GRADIENT "$Id$" #define ID_GRADIENT "$Id$"
namespace JSBSim {
class FGFCS; class FGFCS;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@ -68,5 +70,5 @@ private:
FGConfigFile* AC_cfg; FGConfigFile* AC_cfg;
void Debug(int from); void Debug(int from);
}; };
}
#endif #endif

View file

@ -39,6 +39,8 @@ INCLUDES
#include "FGKinemat.h" #include "FGKinemat.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_FLAPS; static const char *IdHdr = ID_FLAPS;
@ -65,9 +67,7 @@ FGKinemat::FGKinemat(FGFCS* fcs, FGConfigFile* AC_cfg) : FGFCSComponent(fcs),
while ((token = AC_cfg->GetValue()) != string("/COMPONENT")) { while ((token = AC_cfg->GetValue()) != string("/COMPONENT")) {
*AC_cfg >> token; *AC_cfg >> token;
if (token == "ID") { if (token == "INPUT") {
*AC_cfg >> ID;
} else if (token == "INPUT") {
token = AC_cfg->GetValue("INPUT"); token = AC_cfg->GetValue("INPUT");
if( InputNodes.size() > 0 ) { if( InputNodes.size() > 0 ) {
cerr << "Kinemat can only accept one input" << endl; cerr << "Kinemat can only accept one input" << endl;
@ -226,4 +226,4 @@ void FGKinemat::Debug(int from)
} }
} }
} }
}

View file

@ -66,6 +66,8 @@ DEFINES
CLASS DECLARATION CLASS DECLARATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
namespace JSBSim {
class FGKinemat : public FGFCSComponent { class FGKinemat : public FGFCSComponent {
public: public:
FGKinemat(FGFCS* fcs, FGConfigFile* AC_cfg); FGKinemat(FGFCS* fcs, FGConfigFile* AC_cfg);
@ -88,5 +90,5 @@ private:
void Debug(int from); void Debug(int from);
}; };
}
#endif #endif

View file

@ -39,6 +39,8 @@ INCLUDES
#include "FGSummer.h" #include "FGSummer.h"
namespace JSBSim {
static const char *IdSrc = "$Id$"; static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_SUMMER; static const char *IdHdr = ID_SUMMER;
@ -63,9 +65,7 @@ FGSummer::FGSummer(FGFCS* fcs, FGConfigFile* AC_cfg) : FGFCSComponent(fcs),
while ((token = AC_cfg->GetValue()) != string("/COMPONENT")) { while ((token = AC_cfg->GetValue()) != string("/COMPONENT")) {
*AC_cfg >> token; *AC_cfg >> token;
if (token == "ID") { if (token == "INPUT") {
*AC_cfg >> ID;
} else if (token == "INPUT") {
token = AC_cfg->GetValue("INPUT"); token = AC_cfg->GetValue("INPUT");
*AC_cfg >> token; *AC_cfg >> token;
InputNodes.push_back( resolveSymbol(token) ); InputNodes.push_back( resolveSymbol(token) );
@ -169,4 +169,4 @@ void FGSummer::Debug(int from)
} }
} }
} }
}

Some files were not shown because too many files have changed in this diff Show more