-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Header: FGGroundReactions.h
Author: Jon S. Berndt
--------------------------------------------------------------------------------
09/13/00 JSB Created
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
COMMENTS, REFERENCES, and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#ifndef FGGROUNDREACTIONS_H
#define FGGROUNDREACTIONS_H
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#ifdef FGFS
# include <simgear/compiler.h>
-# ifdef FG_HAVE_STD_INCLUDES
+# ifdef SG_HAVE_STD_INCLUDES
# include <vector>
# else
# include <vector.h>
#endif
#include "FGModel.h"
+#include "FGConfigFile.h"
+#include "FGLGear.h"
+#include "FGInertial.h"
+#include "FGMatrix33.h"
-/*******************************************************************************
-CLASS DECLARATION
-*******************************************************************************/
+#define ID_GROUNDREACTIONS "$Id$"
-class FGGroundReactions : public FGModel {
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DECLARATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+class FGGroundReactions : public FGModel
+{
public:
FGGroundReactions(FGFDMExec*);
~FGGroundReactions(void);
bool Run(void);
- bool LoadGroundReactions(FGConfigFile* AC_cfg);
+ bool Load(FGConfigFile* AC_cfg);
+ FGColumnVector3& GetForces(void) {return vForces;}
+ double GetForces(int idx) const {return vForces(idx);}
+ FGColumnVector3& GetMoments(void) {return vMoments;}
+ double GetMoments(int idx) const {return vMoments(idx);}
+ string GetGroundReactionStrings(void);
+ string GetGroundReactionValues(void);
+
+ inline int GetNumGearUnits(void) const { return lGear.size(); }
+ /** Gets a gear instance
+ @param gear index of gear instance
+ @return a pointer to the FGLGear instance of the gear unit requested */
+
+
+ inline FGLGear* GetGearUnit(int gear) { return &(lGear[gear]); }
+
+ void bind(void);
+ void unbind(void);
+
+private:
+ vector <FGLGear> lGear;
+ FGColumnVector3 vForces;
+ FGColumnVector3 vMoments;
+ FGColumnVector3 vMaxStaticGrip;
+ FGColumnVector3 vMaxMomentResist;
+
+ void Debug(int from);
};
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif