]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/models/FGAerodynamics.h
Andreas Gaeb: fix #222 (JSBSIm reset problems)
[flightgear.git] / src / FDM / JSBSim / models / FGAerodynamics.h
index fce51a1015111d35eb7b6524605b21ef8efad78c..a5e2781959da3b3e8ce398c697b8203d53c06ed6 100644 (file)
@@ -38,6 +38,7 @@ SENTRY
 INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
+#include <string>
 #include <vector>
 #include <map>
 
@@ -51,7 +52,7 @@ INCLUDES
 DEFINITIONS
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-#define ID_AERODYNAMICS "$Id$"
+#define ID_AERODYNAMICS "$Id: FGAerodynamics.h,v 1.21 2010/11/18 12:38:06 jberndt Exp $"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 FORWARD DECLARATIONS
@@ -108,7 +109,7 @@ CLASS DOCUMENTATION
     Systems may NOT be combined, or a load error will occur.
 
     @author Jon S. Berndt, Tony Peden
-    @version $Revision$
+    @version $Revision: 1.21 $
 */
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -140,7 +141,7 @@ public:
 
   /** Gets the total aerodynamic force vector.
       @return a force vector reference. */
-  FGColumnVector3& GetForces(void) {return vForces;}
+  const FGColumnVector3& GetForces(void) const {return vForces;}
 
   /** Gets the aerodynamic force for an axis.
       @param n Axis index. This could be 0, 1, or 2, or one of the
@@ -150,7 +151,7 @@ public:
 
   /** Gets the total aerodynamic moment vector.
       @return a moment vector reference. */
-  FGColumnVector3& GetMoments(void) {return vMoments;}
+  const FGColumnVector3& GetMoments(void) const {return vMoments;}
 
   /** Gets the aerodynamic moment for an axis.
       @return the moment about a single axis (as described also in the
@@ -159,7 +160,7 @@ public:
 
   /** Retrieves the aerodynamic forces in the wind axes.
       @return a reference to a column vector containing the wind axis forces. */
-  FGColumnVector3& GetvFw(void) { return vFw; }
+  const FGColumnVector3& GetvFw(void) const { return vFw; }
 
   /** Retrieves the aerodynamic forces in the wind axes, given an axis.
       @param axis the axis to return the force for (eX, eY, eZ).
@@ -168,33 +169,33 @@ public:
   double GetvFw(int axis) const { return vFw(axis); }
 
   /** Retrieves the lift over drag ratio */
-  inline double GetLoD(void) const { return lod; }
+  double GetLoD(void) const { return lod; }
 
   /** Retrieves the square of the lift coefficient. */
-  inline double GetClSquared(void) const { return clsq; }
-  inline double GetAlphaCLMax(void) const { return alphaclmax; }
-  inline double GetAlphaCLMin(void) const { return alphaclmin; }
+  double GetClSquared(void) const { return clsq; }
+  double GetAlphaCLMax(void) const { return alphaclmax; }
+  double GetAlphaCLMin(void) const { return alphaclmin; }
 
-  inline double GetHysteresisParm(void) const { return stall_hyst; }
-  inline double GetStallWarn(void) const { return impending_stall; }
+  double GetHysteresisParm(void) const { return stall_hyst; }
+  double GetStallWarn(void) const { return impending_stall; }
   double GetAlphaW(void) const { return alphaw; }
 
   double GetBI2Vel(void) const { return bi2vel; }
   double GetCI2Vel(void) const { return ci2vel; }
 
-  inline void SetAlphaCLMax(double tt) { alphaclmax=tt; }
-  inline void SetAlphaCLMin(double tt) { alphaclmin=tt; }
+  void SetAlphaCLMax(double tt) { alphaclmax=tt; }
+  void SetAlphaCLMin(double tt) { alphaclmin=tt; }
 
   /** Gets the strings for the current set of coefficients.
       @param delimeter either a tab or comma string depending on output type
       @return a string containing the descriptive names for all coefficients */
-  string GetCoefficientStrings(string delimeter);
+  std::string GetCoefficientStrings(const std::string& delimeter) const;
 
   /** Gets the coefficient values.
       @param delimeter either a tab or comma string depending on output type
       @return a string containing the numeric values for the current set of
       coefficients */
-  string GetCoefficientValues(string delimeter);
+  std::string GetCoefficientValues(const std::string& delimeter) const;
 
   /** Calculates and returns the wind-to-body axis transformation matrix.
       @return a reference to the wind-to-body transformation matrix.
@@ -206,14 +207,13 @@ public:
       */
   FGMatrix33& GetTb2w(void);
 
-  vector <FGFunction*> * GetCoeff(void) const { return Coeff; }
+  std::vector <FGFunction*> * GetCoeff(void) const { return Coeff; }
 
 private:
   enum eAxisType {atNone, atLiftDrag, atAxialNormal, atBodyXYZ} axisType;
-  typedef map<string,int> AxisIndex;
+  typedef std::map<std::string,int> AxisIndex;
   AxisIndex AxisIdx;
   FGFunction* AeroRPShift;
-  vector <FGFunction*> variables;
   typedef vector <FGFunction*> CoeffArray;
   CoeffArray* Coeff;
   FGColumnVector3 vFnative;