Author: Jon S. Berndt
Date started: 09/13/00
- ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999 Jon S. Berndt (jon@jsbsim.org) -------------
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free Software
INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#ifdef FGFS
-# include <simgear/compiler.h>
-# ifdef SG_HAVE_STD_INCLUDES
-# include <vector>
-# include <map>
-# else
-# include <vector.h>
-# include <map.h>
-# endif
-#else
-# include <vector>
-# include <map>
-#endif
+#include <string>
+#include <vector>
+#include <map>
#include "FGModel.h"
-#include <math/FGFunction.h>
-#include <math/FGColumnVector3.h>
-#include <math/FGMatrix33.h>
-#include <input_output/FGXMLFileRead.h>
+#include "math/FGFunction.h"
+#include "math/FGColumnVector3.h"
+#include "math/FGMatrix33.h"
+#include "input_output/FGXMLFileRead.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#define ID_AERODYNAMICS "$Id$"
+#define ID_AERODYNAMICS "$Id: FGAerodynamics.h,v 1.22 2011/03/11 13:02:26 jberndt Exp $"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FORWARD DECLARATIONS
{function contents}
</function>
<axis name="{LIFT | DRAG | SIDE | ROLL | PITCH | YAW}">
- {force coefficient definitions}
+ {force or moment definitions}
</axis>
{additional axis definitions}
</aerodynamics>
<br>
2) Axial-Normal coordinate system:
@code
- <axis name="{AXIAL | NORMAL}">
+ <axis name="{AXIAL | NORMAL | SIDE}">
@endcode
<br>
Systems may NOT be combined, or a load error will occur.
@author Jon S. Berndt, Tony Peden
- @version $Revision$
+ @version $Revision: 1.22 $
*/
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
/** 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
/** 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
/** 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).
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.
+ /** Gets the strings for the current set of aero functions.
@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);
+ @return a string containing the descriptive names for all aero functions */
+ std::string GetAeroFunctionStrings(const std::string& delimeter) const;
- /** Gets the coefficient values.
+ /** Gets the aero function 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);
+ aero functions */
+ std::string GetAeroFunctionValues(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.
*/
FGMatrix33& GetTb2w(void);
- vector <FGFunction*> * GetCoeff(void) const { return Coeff; }
+ std::vector <FGFunction*> * GetAeroFunctions(void) const { return AeroFunctions; }
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;
+ typedef vector <FGFunction*> AeroFunctionArray;
+ AeroFunctionArray* AeroFunctions;
FGColumnVector3 vFnative;
FGColumnVector3 vFw;
FGColumnVector3 vForces;