00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef FGAERODYNAMICS_H
00035 #define FGAERODYNAMICS_H
00036
00037
00038
00039
00040
00041 #include <vector>
00042 #include <map>
00043
00044 #include "FGModel.h"
00045 #include <math/FGFunction.h>
00046 #include <math/FGColumnVector3.h>
00047 #include <math/FGMatrix33.h>
00048 #include <input_output/FGXMLFileRead.h>
00049
00050
00051
00052
00053
00054 #define ID_AERODYNAMICS "$Id: FGAerodynamics.h,v 1.16 2008/07/22 02:42:17 jberndt Exp $"
00055
00056
00057
00058
00059
00060 namespace JSBSim {
00061
00062
00063
00064
00065
00114
00115
00116
00117
00118 class FGAerodynamics : public FGModel, public FGXMLFileRead
00119 {
00120
00121 public:
00124 FGAerodynamics(FGFDMExec* Executive);
00126 ~FGAerodynamics();
00127
00128 bool InitModel(void);
00129
00132 bool Run(void);
00133
00139 bool Load(Element* element);
00140
00143 FGColumnVector3& GetForces(void) {return vForces;}
00144
00149 double GetForces(int n) const {return vForces(n);}
00150
00153 FGColumnVector3& GetMoments(void) {return vMoments;}
00154
00158 double GetMoments(int n) const {return vMoments(n);}
00159
00162 FGColumnVector3& GetvFw(void) { return vFw; }
00163
00168 double GetvFw(int axis) const { return vFw(axis); }
00169
00171 inline double GetLoD(void) const { return lod; }
00172
00174 inline double GetClSquared(void) const { return clsq; }
00175 inline double GetAlphaCLMax(void) const { return alphaclmax; }
00176 inline double GetAlphaCLMin(void) const { return alphaclmin; }
00177
00178 inline double GetHysteresisParm(void) const { return stall_hyst; }
00179 inline double GetStallWarn(void) const { return impending_stall; }
00180 double GetAlphaW(void) const { return alphaw; }
00181
00182 double GetBI2Vel(void) const { return bi2vel; }
00183 double GetCI2Vel(void) const { return ci2vel; }
00184
00185 inline void SetAlphaCLMax(double tt) { alphaclmax=tt; }
00186 inline void SetAlphaCLMin(double tt) { alphaclmin=tt; }
00187
00191 string GetCoefficientStrings(string delimeter);
00192
00197 string GetCoefficientValues(string delimeter);
00198
00202 FGMatrix33& GetTw2b(void);
00203
00207 FGMatrix33& GetTb2w(void);
00208
00209 vector <FGFunction*> * GetCoeff(void) const { return Coeff; }
00210
00211 private:
00212 enum eAxisType {atNone, atLiftDrag, atAxialNormal, atBodyXYZ} axisType;
00213 typedef map<string,int> AxisIndex;
00214 AxisIndex AxisIdx;
00215 FGFunction* AeroRPShift;
00216 vector <FGFunction*> variables;
00217 typedef vector <FGFunction*> CoeffArray;
00218 CoeffArray* Coeff;
00219 FGColumnVector3 vFnative;
00220 FGColumnVector3 vFw;
00221 FGColumnVector3 vForces;
00222 FGColumnVector3 vMoments;
00223 FGColumnVector3 vDXYZcg;
00224 FGColumnVector3 vDeltaRP;
00225 FGMatrix33 mTw2b;
00226 FGMatrix33 mTb2w;
00227 double alphaclmax, alphaclmin;
00228 double alphahystmax, alphahystmin;
00229 double impending_stall, stall_hyst;
00230 double bi2vel, ci2vel,alphaw;
00231 double clsq, lod, qbar_area;
00232
00233 typedef double (FGAerodynamics::*PMF)(int) const;
00234 void DetermineAxisSystem(void);
00235 void bind(void);
00236
00237 void Debug(int from);
00238 };
00239
00240 }
00241
00242
00243 #endif
00244