FGPath engine_path( current_options.get_fg_root() );
engine_path.append( "Engine" );
- FDMExec.GetAircraft()->LoadAircraftEx(aircraft_path.str(),
+ FDMExec.GetAircraft()->LoadAircraft(aircraft_path.str(),
engine_path.str(), "X15");
FG_LOG( FG_FLIGHT, FG_INFO, " loaded aircraft" );
CnDr - Yaw moment due to rudder
CnDa - Yaw moment due to aileron
-This class expects to be run in a directory which contains the subdirectory
-structure shown below (where example aircraft X-15 is shown):
-
-aircraft/
- X-15/
- X-15.dat reset00 reset01 reset02 ...
- CDRAG/
- a0 a M De
- CSIDE/
- b r Dr Da
- CLIFT/
- a0 a M adt De
- CROLL/
- b p r Da Dr
- CPITCH/
- a0 a adt q M De
- CYAW/
- b p r Dr Da
- F-16/
- F-16.dat reset00 reset01 ...
- CDRAG/
- a0 a M De
- ...
-
-The General Idea
-
-The file structure is arranged so that various modeled aircraft are stored in
-their own subdirectory. Each aircraft subdirectory is named after the aircraft.
-There should be a file present in the specific aircraft subdirectory (e.g.
-aircraft/X-15) with the same name as the directory with a .dat appended. This
-file contains mass properties information, name of aircraft, etc. for the
-aircraft. In that same directory are reset files numbered starting from 0 (two
-digit numbers), e.g. reset03. Within each reset file are values for important
-state variables for specific flight conditions (altitude, airspeed, etc.). Also
-within this directory are the directories containing lookup tables for the
-stability derivatives for the aircraft.
-
********************************************************************************
INCLUDES
*******************************************************************************/
{
}
-bool FGAircraft::LoadAircraftEx(string aircraft_path, string engine_path, string fname)
+bool FGAircraft::LoadAircraft(string aircraft_path, string engine_path, string fname)
{
string path;
string fullpath;
string holding_string;
char scratch[128];
ifstream coeffInFile;
+ streampos gpos;
+ int axis;
+ string axis_descript;
+ axis = -1;
aircraftDef = aircraft_path + "/" + fname + "/" + fname + ".cfg";
ifstream aircraftfile(aircraftDef.c_str());
cout << "Reading Aircraft Configuration File: " << aircraftDef << endl;
while (!aircraftfile.fail()) {
holding_string.erase();
aircraftfile >> holding_string;
- // if (holding_string.compare("//",0,2) != 0) {
- if ( !(holding_string.substr(0, 2) == "//") ) {
-
+#ifdef __BORLANDC__
+ if (holding_string.compare(0, 2, "//") != 0) {
+#else
+ if (holding_string.compare("//",0,2) != 0) {
+#endif
if (holding_string == "AIRCRAFT") {
cout << "Reading in Aircraft parameters ..." << endl;
} else if (holding_string == "AERODYNAMICS") {
} else if (holding_string == "LIFT") {
- cout << " Lift Coefficients ..." << endl;
- aircraftfile >> tag;
- streampos gpos = aircraftfile.tellg();
- aircraftfile >> tag;
- if ( !(tag == "}") ) {
- aircraftfile.seekg(gpos);
- Coeff[LiftCoeff][coeff_ctr[LiftCoeff]] = new FGCoefficient(FDMExec, aircraftfile);
- coeff_ctr[LiftCoeff]++;
- } else {
- cout << " None found ..." << endl;
- }
-
+ axis_descript = " Lift Coefficients ...";
+ axis = LiftCoeff;
+
} else if (holding_string == "DRAG") {
- cout << " Drag Coefficients ..." << endl;
- aircraftfile >> tag;
- streampos gpos = aircraftfile.tellg();
- aircraftfile >> tag;
- if ( !(tag == "}") ) {
- aircraftfile.seekg(gpos);
- Coeff[DragCoeff][coeff_ctr[DragCoeff]] = new FGCoefficient(FDMExec, aircraftfile);
- coeff_ctr[DragCoeff]++;
- } else {
- cout << " None found ..." << endl;
- }
+ axis_descript = " Drag Coefficients ...";
+ axis = DragCoeff;
} else if (holding_string == "SIDE") {
- cout << " Side Coefficients ..." << endl;
- aircraftfile >> tag;
- streampos gpos = aircraftfile.tellg();
- aircraftfile >> tag;
- if ( !(tag == "}") ) {
- aircraftfile.seekg(gpos);
- Coeff[SideCoeff][coeff_ctr[SideCoeff]] = new FGCoefficient(FDMExec, aircraftfile);
- coeff_ctr[SideCoeff]++;
- } else {
- cout << " None found ..." << endl;
- }
+ axis_descript = " Side Coefficients ...";
+ axis = SideCoeff;
} else if (holding_string == "ROLL") {
- cout << " Roll Coefficients ..." << endl;
- aircraftfile >> tag;
- streampos gpos = aircraftfile.tellg();
- aircraftfile >> tag;
- if ( !(tag == "}") ) {
- aircraftfile.seekg(gpos);
- Coeff[RollCoeff][coeff_ctr[RollCoeff]] = new FGCoefficient(FDMExec, aircraftfile);
- coeff_ctr[RollCoeff]++;
- } else {
- cout << " None found ..." << endl;
- }
+ axis_descript = " Roll Coefficients ...";
+ axis = RollCoeff;
} else if (holding_string == "PITCH") {
- cout << " Pitch Coefficients ..." << endl;
- aircraftfile >> tag;
- streampos gpos = aircraftfile.tellg();
- aircraftfile >> tag;
- if ( !(tag == "}") ) {
- aircraftfile.seekg(gpos);
- Coeff[PitchCoeff][coeff_ctr[PitchCoeff]] = new FGCoefficient(FDMExec, aircraftfile);
- coeff_ctr[PitchCoeff]++;
- } else {
- cout << " None found ..." << endl;
- }
+ axis_descript = " Pitch Coefficients ...";
+ axis = PitchCoeff;
} else if (holding_string == "YAW") {
- cout << " Yaw Coefficients ..." << endl;
- aircraftfile >> tag;
- streampos gpos = aircraftfile.tellg();
- aircraftfile >> tag;
- if ( !(tag == "}") ) {
- aircraftfile.seekg(gpos);
- Coeff[YawCoeff][coeff_ctr[YawCoeff]] = new FGCoefficient(FDMExec, aircraftfile);
- coeff_ctr[YawCoeff]++;
- } else {
- cout << " None found ..." << endl;
- }
-
- } else {
+ axis_descript = " Yaw Coefficients ...";
+ axis = YawCoeff;
+
}
+ if (axis >= 0) {
+ cout << axis_descript << endl;
+ aircraftfile >> tag;
+ gpos = aircraftfile.tellg();
+ aircraftfile >> tag;
+ if (tag != "}" ) {
+ while (tag != "}") {
+ aircraftfile.seekg(gpos);
+ Coeff[axis][coeff_ctr[axis]] = new FGCoefficient(FDMExec, aircraftfile);
+ coeff_ctr[axis]++;
+ aircraftfile >> tag;
+ gpos = aircraftfile.tellg();
+ aircraftfile >> tag;
+ }
+ } else {
+ cout << " None found ..." << endl;
+ }
+ }
+ axis = -1;
+
} else {
aircraftfile.getline(scratch, 127);
}
}
cout << "End of Configuration File Parsing." << endl;
- return true;
+
+ return true;
}
~FGAircraft(void);
bool Run(void);
- bool LoadAircraftEx(string, string, string);
+ bool LoadAircraft(string, string, string);
inline string GetAircraftName(void) {return AircraftName;}
inline void SetGearUp(bool tt) {GearUp = tt;}
inline bool GetGearUp(void) {return GearUp;}
+ 7.0E-13*State->Geth()*State->Geth()
- 2.0E-18*State->Geth()*State->Geth()*State->Geth();
- State->SetMach(State->GetVt()/State->Geta());
+ State->SetMach(State->GetVt()/State->Geta());
} else { // skip Run() execution this time
}
return false;
}
+
+float FGAtmosphere::CalcRho(float altitude)
+{
+ return (0.002377 - 7.0E-08*altitude
+ + 7.0E-13*altitude*altitude
+ - 2.0E-18*altitude*altitude*altitude);
+
+}
+
class FGAtmosphere : public FGModel
{
public:
- // ***************************************************************************
- /** @memo Constructor
- @param FGFDMExec* - a pointer to the "owning" FDM Executive
- */
FGAtmosphere(FGFDMExec*);
-
- // ***************************************************************************
- /** @memo Destructor
- */
~FGAtmosphere(void);
-
- // ***************************************************************************
- /** This must be called for each dt to execute the model algorithm */
bool Run(void);
- // ***************************************************************************
- /** @memo Returns the air density
- @return float air density in slugs/cubic foot
- */
inline float Getrho(void) {return rho;}
+ float CalcRho(float altitude);
protected:
This class models the stability derivative coefficient lookup tables or
equations. Note that the coefficients need not be calculated each delta-t.
-The coefficient files are located in the axis subdirectory for each aircraft.
-For instance, for the X-15, you would find subdirectories under the
-aircraft/X-15/ directory named CLIFT, CDRAG, CSIDE, CROLL, CPITCH, CYAW. Under
-each of these directories would be files named a, a0, q, and so on. The file
-named "a" under the CLIFT directory would contain data for the stability
-derivative modeling lift due to a change in alpha. See the FGAircraft.cpp file
-for additional information. The coefficient files have the following format:
-
-<name of coefficient>
-<short description of coefficient with no embedded spaces>
-<method used in calculating the coefficient: TABLE | EQUATION | VECTOR | VALUE>
- <parameter identifier for table row (if required)>
- <parameter identifier for table column (if required)>
-<OR'ed list of parameter identifiers needed to turn this coefficient into a force>
-<number of rows in table (if required)>
-<number of columns in table (if required)>
-
-<value of parameter indexing into the column of a table or vector - or value
- itself for a VALUE coefficient>
-<values of parameter indexing into row of a table if TABLE type> <Value of
- coefficient at this row and column>
-
-<... repeat above for each column of data in table ...>
-
-As an example for the X-15, for the lift due to mach:
-
-CLa0
-Lift_at_zero_alpha
-Table 8 3
-16384
-32768
-16387
-
-0.00
-0.0 0.0
-0.5 0.4
-0.9 0.9
-1.0 1.6
-1.1 1.3
-1.4 1.0
-2.0 0.5
-3.0 0.5
-
-30000.00
-0.0 0.0
-0.5 0.5
-0.9 1.0
-1.0 1.7
-1.1 1.4
-1.4 1.1
-2.0 0.6
-3.0 0.6
-
-70000.00
-0.0 0.0
-0.5 0.6
-0.9 1.1
-1.0 1.7
-1.1 1.5
-1.4 1.2
-2.0 0.7
-3.0 0.7
-
Note that the values in a row which index into the table must be the same value
for each column of data, so the first column of numbers for each altitude are
seen to be equal, and there are the same number of values for each altitude.
FGCoefficient::FGCoefficient(FGFDMExec* fdex, ifstream& coeffDefFile)
{
- int r, c;
+ int r, c, start, end, n;
float ftrashcan;
string strashcan;
+ coeffdef["FG_QBAR"] = 1;
+ coeffdef["FG_WINGAREA"] = 2;
+ coeffdef["FG_WINGSPAN"] = 4;
+ coeffdef["FG_CBAR"] = 8;
+ coeffdef["FG_ALPHA"] = 16;
+ coeffdef["FG_ALPHADOT"] = 32;
+ coeffdef["FG_BETA"] = 64;
+ coeffdef["FG_BETADOT"] = 128;
+ coeffdef["FG_PITCHRATE"] = 256;
+ coeffdef["FG_ROLLRATE"] = 512;
+ coeffdef["FG_YAWRATE"] = 1024;
+ coeffdef["FG_ELEVATOR"] = 2048;
+ coeffdef["FG_AILERON"] = 4096;
+ coeffdef["FG_RUDDER"] = 8192;
+ coeffdef["FG_MACH"] = 16384;
+ coeffdef["FG_ALTITUDE"] = 32768L;
+ coeffdef["FG_I2VEL"] = 65536L;
+ coeffdef["FG_HALF"] = 131072L;
+
FDMExec = fdex;
State = FDMExec->GetState();
Atmosphere = FDMExec->GetAtmosphere();
coeffDefFile >> columns;
cout << "Cols: " << columns;
}
- coeffDefFile >> LookupR;
+
cout << endl;
- cout << " Row indexing parameter: " << LookupR << endl;
+
+ coeffDefFile >> strashcan;
+ if (strashcan.substr(0,1) == "F") {
+ LookupR = coeffdef[strashcan.c_str()];
+ cout << " Row indexing parameter: " << strashcan << endl;
+ } else {
+ LookupR = atoi(strashcan.c_str());
+ cout << " Row indexing parameter: " << LookupR << endl;
+ }
+
}
if (type == TABLE) {
- coeffDefFile >> LookupC;
- cout << " Column indexing parameter: " << LookupC << endl;
+ coeffDefFile >> strashcan;
+ if (strashcan.substr(0,1) == "F") {
+ LookupC = coeffdef[strashcan.c_str()];
+ cout << " Column indexing parameter: " << strashcan << endl;
+ } else {
+ LookupC = atoi(strashcan.c_str());
+ cout << " Column indexing parameter: " << LookupC << endl;
+ }
+ }
+
+ coeffDefFile >> strashcan;
+
+ end = strashcan.length();
+ n = strashcan.find("|");
+ start = 0;
+ multipliers = 0;
+ if (strashcan.substr(0,1) == "F") {
+ while(n < end && n >= 0) {
+ n -= start;
+ multipliers += coeffdef[strashcan.substr(start,n).c_str()];
+ start += n+1;
+ n = strashcan.find("|",start);
+ }
+ multipliers += coeffdef[strashcan.substr(start,end).c_str()];
+ } else {
+ multipliers = atoi(strashcan.c_str());
}
- coeffDefFile >> multipliers;
cout << " Non-Dimensionalized by: ";
-
+
mult_count = 0;
if (multipliers & FG_QBAR) {
mult_idx[mult_count] = FG_QBAR;
mult_idx[mult_count] = FG_ALTITUDE;
mult_count++;
cout << "h ";
+ }
+ if (multipliers & FG_I2VEL) {
+ mult_idx[mult_count] = FG_I2VEL;
+ mult_count++;
+ cout << "1 /(2*Vt) ";
}
cout << endl;
-
+
switch(type) {
case VALUE:
coeffDefFile >> StaticValue;
+ cout << " Value = " << StaticValue << endl;
break;
case VECTOR:
Allocate(rows,2);
case TABLE:
Allocate(rows, columns);
+ Table3D[0][0] = 0.0;
for (c=1;c<=columns;c++) {
coeffDefFile >> Table3D[0][c];
for (r=1;r<=rows;r++) {
}
cout << endl;
}
-
+
break;
}
} else {
col2temp = rFactor*(Table3D[r][c] - Table3D[r-1][c]) + Table3D[r-1][c];
Value = col1temp + cFactor*(col2temp - col1temp);
-
-//cout << "Value for " << description << " is " << Value;
-
+
for (midx=0;midx<mult_count;midx++) {
Value *= GetCoeffVal(mult_idx[midx]);
}
-//cout << " after multipliers it is: " << Value << endl;
-
return Value;
}
int r, midx;
if (rows < 2) return 0.0;
-
+
for (r=1;r<=rows;r++) if (Table3D[r][0] >= Val) break;
r = r < 2 ? 2 : (r > rows ? rows : r);
Value = Factor*(Table3D[r][1] - Table3D[r-1][1]) + Table3D[r-1][1];
-// cout << "Value for " << description << " is " << Value;
-
for (midx=0;midx<mult_count;midx++) {
Value *= GetCoeffVal(mult_idx[midx]);
}
-//cout << " after multipliers it is: " << Value << endl;
-
return Value;
}
Value = StaticValue;
-// cout << "Value for " << description << " is " << Value << endl;
-
for (midx=0;midx<mult_count;midx++) {
Value *= GetCoeffVal(mult_idx[midx]);
}
-// cout << " after multipliers it is: " << Value << endl;
-
return Value;
}
{
switch(val_idx) {
case FG_QBAR:
-//cout << "Qbar: " << State->Getqbar() << endl;
return State->Getqbar();
case FG_WINGAREA:
-//cout << "S: " << Aircraft->GetWingArea() << endl;
return Aircraft->GetWingArea();
case FG_WINGSPAN:
-//cout << "b: " << Aircraft->GetWingSpan() << endl;
return Aircraft->GetWingSpan();
case FG_CBAR:
-//cout << "Cbar: " << Aircraft->Getcbar() << endl;
return Aircraft->Getcbar();
case FG_ALPHA:
-//cout << "Alpha: " << Translation->Getalpha() << endl;
return Translation->Getalpha();
case FG_ALPHADOT:
-//cout << "Adot: " << State->Getadot() << endl;
return State->Getadot();
case FG_BETA:
-//cout << "Beta: " << Translation->Getbeta() << endl;
return Translation->Getbeta();
case FG_BETADOT:
-//cout << "Bdot: " << State->Getbdot() << endl;
return State->Getbdot();
case FG_PITCHRATE:
-//cout << "Q: " << Rotation->GetQ() << endl;
return Rotation->GetQ();
case FG_ROLLRATE:
-//cout << "P: " << Rotation->GetP() << endl;
return Rotation->GetP();
case FG_YAWRATE:
-//cout << "R: " << Rotation->GetR() << endl;
return Rotation->GetR();
case FG_ELEVATOR:
-//cout << "De: " << FCS->GetDe() << endl;
return FCS->GetDe();
case FG_AILERON:
-//cout << "Da: " << FCS->GetDa() << endl;
return FCS->GetDa();
case FG_RUDDER:
-//cout << "Dr: " << FCS->GetDr() << endl;
return FCS->GetDr();
case FG_MACH:
-//cout << "Mach: " << State->GetMach() << endl;
return State->GetMach();
case FG_ALTITUDE:
-//cout << "h: " << State->Geth() << endl;
return State->Geth();
+ case FG_I2VEL:
+ return 1.0/(0.5 * State->GetVt());
}
return 0;
}
+
# include <fstream>
#endif
+#include <map>
+
/*******************************************************************************
DEFINES
*******************************************************************************/
#define FG_RUDDER 8192
#define FG_MACH 16384
#define FG_ALTITUDE 32768L
+#define FG_I2VEL 65536L
/*******************************************************************************
FORWARD DECLARATIONS
/*******************************************************************************
COMMENTS, REFERENCES, and NOTES
-*******************************************************************************/
-/**
+********************************************************************************
+
This class models the stability derivative coefficient lookup tables or
equations. Note that the coefficients need not be calculated each delta-t.
-The coefficient files are located in the axis subdirectory for each aircraft.
-For instance, for the X-15, you would find subdirectories under the
-aircraft/X-15/ directory named CLIFT, CDRAG, CSIDE, CROLL, CPITCH, CYAW. Under
-each of these directories would be files named a, a0, q, and so on. The file
-named "a" under the CLIFT directory would contain data for the stability
-derivative modeling lift due to a change in alpha. See the FGAircraft.cpp file
-for additional information. The coefficient files have the following format:
-
-<name of coefficient>
-<short description of coefficient with no embedded spaces>
-<method used in calculating the coefficient: TABLE | EQUATION | VECTOR | VALUE>
- <parameter identifier for table row (if required)>
- <parameter identifier for table column (if required)>
-<OR'ed list of parameter identifiers needed to turn this coefficient into a force>
-<number of rows in table (if required)>
-<number of columns in table (if required)>
-
-<value of parameter indexing into the column of a table or vector - or value
- itself for a VALUE coefficient>
-<values of parameter indexing into row of a table if TABLE type> <Value of
- coefficient at this row and column>
-
-<... repeat above for each column of data in table ...>
-
-As an example for the X-15, for the lift due to mach:
-<PRE>
-
-CLa0
-Lift_at_zero_alpha
-Table 8 3
-16384
-32768
-16387
-
-0.00
-0.0 0.0
-0.5 0.4
-0.9 0.9
-1.0 1.6
-1.1 1.3
-1.4 1.0
-2.0 0.5
-3.0 0.5
-
-30000.00
-0.0 0.0
-0.5 0.5
-0.9 1.0
-1.0 1.7
-1.1 1.4
-1.4 1.1
-2.0 0.6
-3.0 0.6
-
-70000.00
-0.0 0.0
-0.5 0.6
-0.9 1.1
-1.0 1.7
-1.1 1.5
-1.4 1.2
-2.0 0.7
-3.0 0.7
-</PRE>
-
-Note that the values in a row which index into the table must be the same value
-for each column of data, so the first column of numbers for each altitude are
-seen to be equal, and there are the same number of values for each altitude.
-
-<PRE>
FG_QBAR 1
FG_WINGAREA 2
FG_WINGSPAN 4
FG_RUDDER 8192
FG_MACH 16384
FG_ALTITUDE 32768L
-</PRE>
-@author Jon S. Berndt
-@memo This class models the stability derivative coefficient lookup tables or equations.
-*/
-/*******************************************************************************
+FG_I2VEL 65536L
+
+********************************************************************************
CLASS DECLARATION
*******************************************************************************/
class FGCoefficient
{
public:
- // ***************************************************************************
- /** @memo
- @param
- @return
- */
FGCoefficient(FGFDMExec*, ifstream&);
-
- // ***************************************************************************
- /** @memo
- @param
- @return
- */
~FGCoefficient(void);
-
- // ***************************************************************************
- /** @memo
- @param
- @return
- */
bool Allocate(int);
-
- // ***************************************************************************
- /** @memo
- @param
- @return
- */
bool Allocate(int, int);
-
- // ***************************************************************************
- /** @memo
- @param
- @return
- */
float Value(float, float);
-
- // ***************************************************************************
- /** @memo
- @param
- @return
- */
float Value(float);
-
- // ***************************************************************************
- /** @memo
- @param
- @return
- */
float Value(void);
-
- // ***************************************************************************
- /** @memo
- @param
- @return
- */
float TotalValue(void);
-
- // ***************************************************************************
- /** @memo
- @param
- @return
- */
enum Type {UNKNOWN, VALUE, VECTOR, TABLE, EQUATION};
protected:
private:
+ typedef map<string, long> CoeffMap;
+ CoeffMap coeffdef;
string filename;
string description;
string name;
// $Log$
-// Revision 1.4 1999/06/20 02:12:07 curt
-// Updated JSBsim from Jon Berndt
-// Fixed a typo in hud.cxx.
-//
-// Revision 1.1.1.1 1999/06/17 18:07:34 curt
-// Start of 0.7.x branch
-//
-// Revision 1.3 1999/05/08 03:19:15 curt
-// Incorporated latest JSBsim updates.
+// Revision 1.5 1999/06/21 03:02:05 curt
+// Updates to JSBsim.
//
// Revision 1.1 1999/02/13 01:12:03 curt
// Initial Revision.
// $Log$
-// Revision 1.4 1999/06/20 02:12:08 curt
-// Updated JSBsim from Jon Berndt
-// Fixed a typo in hud.cxx.
-//
-// Revision 1.1.1.1 1999/06/17 18:07:34 curt
-// Start of 0.7.x branch
-//
-// Revision 1.3 1999/05/08 03:19:16 curt
-// Incorporated latest JSBsim updates.
+// Revision 1.5 1999/06/21 03:02:06 curt
+// Updates to JSBsim.
//
// Revision 1.1 1999/02/13 01:12:03 curt
// Initial Revision.
Schedule(Translation, 1);
Schedule(Position, 1);
Schedule(Auxiliary, 1);
- Schedule(Output, 5);
+ Schedule(Output, 1);
terminate = false;
frozen = false;
{
FGFDMExec* FDMExec;
- struct timespec short_wait = {0,100000000};
- struct timespec no_wait = {0,100000000};
+// struct timespec short_wait = {0,100000000};
+// struct timespec no_wait = {0,100000000};
if (argc != 3) {
cout << endl
FDMExec = new FGFDMExec();
- FDMExec->GetAircraft()->LoadAircraftEx("aircraft", "engine", string(argv[1]));
+ FDMExec->GetAircraft()->LoadAircraft("aircraft", "engine", string(argv[1]));
FDMExec->GetState()->Reset("aircraft", string(argv[2]));
while (FDMExec->GetState()->Getsim_time() <= 25.0)
if (FDMExec->GetState()->Getsim_time() > 5.0) {
FDMExec->GetFCS()->SetDa(0.05);
- FDMExec->GetFCS()->SetDr(0.05);
- FDMExec->GetFCS()->SetDe(0.05);
+// FDMExec->GetFCS()->SetDr(0.05);
+// FDMExec->GetFCS()->SetDe(0.05);
}
FDMExec->Run();
- nanosleep(&short_wait,&no_wait);
+// nanosleep(&short_wait,&no_wait);
}
delete FDMExec;
FDMExec->GetTranslation()->SetABG(alpha, beta, gamma);
Vt = sqrt(U*U + V*V + W*W);
- qbar = sqrt(U*U + V*V + W*W);
+ qbar = 0.5*(U*U + V*V + W*W)*FDMExec->GetAtmosphere()->CalcRho(h);
Q0 = sin(psi*0.5)*sin(tht*0.5)*sin(phi*0.5) + cos(psi*0.5)*cos(tht*0.5)*cos(phi*0.5);
Q1 = -sin(psi*0.5)*sin(tht*0.5)*cos(phi*0.5) + cos(psi*0.5)*cos(tht*0.5)*sin(phi*0.5);