]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGGroundReactions.h
Fix stall widths for the "auxilliary" (reverse flow) stalls so they
[flightgear.git] / src / FDM / JSBSim / FGGroundReactions.h
index 5c4135ad373e10e141eb6e7866360468a1b26608..ce3a5a9e967547312cf456bf40190e7432c7c9a7 100644 (file)
@@ -27,10 +27,6 @@ HISTORY
 --------------------------------------------------------------------------------
 09/13/00   JSB   Created
 
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-COMMENTS, REFERENCES,  and NOTES
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@@ -44,7 +40,7 @@ INCLUDES
 
 #ifdef FGFS
 #  include <simgear/compiler.h>
-#  ifdef FG_HAVE_STD_INCLUDES
+#  ifdef SG_HAVE_STD_INCLUDES
 #    include <vector>
 #  else
 #    include <vector.h>
@@ -55,23 +51,63 @@ INCLUDES
 
 #include "FGModel.h"
 #include "FGConfigFile.h"
+#include "FGLGear.h"
+#include "FGColumnVector3.h"
 
-#define ID_GROUNDREACTIONS "$Header"
+#define ID_GROUNDREACTIONS "$Id$"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-CLASS DECLARATION
+FORWARD DECLARATIONS
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-class FGGroundReactions : public FGModel {
+namespace JSBSim {
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DOCUMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
+/** Manages ground reactions modeling.
+  */
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+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(string delimeter);
+  string GetGroundReactionValues(string delimeter);
+  
+  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