]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGLGear.h
JSBSim tweaks.
[flightgear.git] / src / FDM / JSBSim / FGLGear.h
index 0b2536a187e002f21c3492eb1499e4a784ee005a..046853d5fb4718240d8267735416d7d32f411d77 100644 (file)
@@ -46,13 +46,12 @@ INCLUDES
 #include "FGConfigFile.h"
 #include "FGMatrix.h"
 #include "FGFDMExec.h"
-#include "FGState.h"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINITIONS
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-#define ID_LGEAR "$Header"
+#define ID_LGEAR "$Id$"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 FORWARD DECLARATIONS
@@ -61,6 +60,9 @@ FORWARD DECLARATIONS
 class FGAircraft;
 class FGPosition;
 class FGRotation;
+class FGFCS;
+class FGState;
+class FGMassBalance;
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
@@ -143,6 +145,7 @@ CLASS DOCUMENTATION
     length times the spring coefficient and the gear velocity times the damping
     coefficient.</li>
     <li>The lateral/directional force acting on the aircraft through the landing
+
     gear (along the local frame X and Y axes) is calculated next. First, the
     friction coefficient is multiplied by the recently calculated Z-force. This
     is the friction force. It must be given direction in addition to magnitude.
@@ -161,6 +164,8 @@ CLASS DOCUMENTATION
           NASA-Ames", NASA CR-2497, January 1975
     @see Barnes W. McCormick, "Aerodynamics, Aeronautics, and Flight Mechanics",
           Wiley & Sons, 1979 ISBN 0-471-03032-5
+    @see W. A. Ragsdale, "A Generic Landing Gear Dynamics Model for LASRS++",
+     AIAA-2000-4303
 */
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -171,7 +176,9 @@ class FGLGear
 {
 public:
   /// Brake grouping enumerators
-  enum eBrakeGroup {bgNone=0, bgLeft, bgRight, bgCenter, bgNose, bgTail };
+  enum BrakeGroup {bgNone=0, bgLeft, bgRight, bgCenter, bgNose, bgTail };
+  /// Steering group membership enumerators
+  enum SteerType {stSteer, stFixed, stCaster};
   /** Constructor
       @param Executive a pointer to the parent executive object
       @param File a pointer to the config file instance */
@@ -180,17 +187,20 @@ public:
       @param lgear a reference to an existing FGLGear object     */
   FGLGear(const FGLGear& lgear);
   /// Destructor
-  ~FGLGear(void);
+  ~FGLGear();
 
 
   /// The Force vector for this gear
   FGColumnVector Force(void);
   /// The Moment vector for this gear
   FGColumnVector Moment(void) {return vMoment;}
+
   /// Gets the location of the gear in Body axes
   FGColumnVector GetBodyLocation(void) { return vWhlBodyVec; }
-  
+  float GetBodyLocation(int idx) { return vWhlBodyVec(idx); }
+
   FGColumnVector GetLocalGear(void) { return vLocalGear; }
+  float GetLocalGear(int idx) { return vLocalGear(idx); }
 
   /// Gets the name of the gear
   inline string GetName(void)      {return name;          }
@@ -223,7 +233,7 @@ private:
   float bDamp;
   float compressLength;
   float compressSpeed;
-  float staticFCoeff, dynamicFCoeff;
+  float staticFCoeff, dynamicFCoeff, rollingFCoeff;
   float brakePct;
   float maxCompLen;
   double SinkRate;
@@ -236,23 +246,32 @@ private:
   bool Reported;
   bool ReportEnable;
   string name;
-  string SteerType;
-  string BrakeGroup;
-  eBrakeGroup eBrakeGrp;
+  string sSteerType;
+  string sBrakeGroup;
+  BrakeGroup eBrakeGrp;
+  SteerType  eSteerType;
   float  maxSteerAngle;
 
-  FGFDMExec*     Exec;
-  FGState*       State;
-  FGAircraft*    Aircraft;
-  FGPosition*    Position;
-  FGRotation*    Rotation;
+  FGFDMExec*  Exec;
+  FGState*    State;
+  FGAircraft* Aircraft;
+  FGPosition* Position;
+  FGRotation* Rotation;
+  FGFCS*      FCS;
+  FGMassBalance* MassBalance;
 
   void Report(void);
+  void Debug(void);
 };
 
 #include "FGAircraft.h"
 #include "FGPosition.h"
 #include "FGRotation.h"
+#include "FGFCS.h"
+#include "FGMassBalance.h"
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+#include "FGState.h"
+
 #endif