-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Module: FGCoefficient.cpp
Author: Jon S. Berndt
--------------------------------------------------------------------------------
12/28/98 JSB Created
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+#include <stdio.h>
#include "FGCoefficient.h"
-#include "FGAtmosphere.h"
#include "FGState.h"
#include "FGFDMExec.h"
-#include "FGFCS.h"
-#include "FGAircraft.h"
-#include "FGTranslation.h"
-#include "FGRotation.h"
-#include "FGPosition.h"
-#include "FGAuxiliary.h"
-#include "FGOutput.h"
-
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
-
-FGCoefficient::FGCoefficient(FGFDMExec* fdex, ifstream& coeffDefFile)
-{
- 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_BI2VEL"] = 65536L;
- coeffdef["FG_CI2VEL"] = 131072L;
-
- FDMExec = fdex;
- State = FDMExec->GetState();
- Atmosphere = FDMExec->GetAtmosphere();
- FCS = FDMExec->GetFCS();
- Aircraft = FDMExec->GetAircraft();
- Translation = FDMExec->GetTranslation();
- Rotation = FDMExec->GetRotation();
- Position = FDMExec->GetPosition();
- Auxiliary = FDMExec->GetAuxiliary();
- Output = FDMExec->GetOutput();
-
- if (coeffDefFile) {
- if (!coeffDefFile.fail()) {
- coeffDefFile >> name;
- cout << " " << name << endl;
- coeffDefFile >> strashcan;
- coeffDefFile >> description;
- cout << " " << description << endl;
- coeffDefFile >> method;
- cout << " " << method << endl;
+#include "FGPropertyManager.h"
- if (method == "EQUATION") type = EQUATION;
- else if (method == "TABLE") type = TABLE;
- else if (method == "VECTOR") type = VECTOR;
- else if (method == "VALUE") type = VALUE;
- else type = UNKNOWN;
+#ifndef FGFS
+# if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
+# include <iomanip.h>
+# else
+# include <iomanip>
+# endif
+#else
+# include STL_IOMANIP
+#endif
- if (type == VECTOR || type == TABLE) {
- coeffDefFile >> rows;
- cout << " Rows: " << rows << " ";
- if (type == TABLE) {
- coeffDefFile >> columns;
- cout << "Cols: " << columns;
- }
+namespace JSBSim {
- cout << endl;
+static const char *IdSrc = "$Id$";
+static const char *IdHdr = ID_COEFFICIENT;
- 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;
- }
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
- }
+FGCoefficient::FGCoefficient( FGFDMExec* fdex )
+{
+ FDMExec = fdex;
+ State = FDMExec->GetState();
+ Table = 0;
+
+ PropertyManager = FDMExec->GetPropertyManager();
+
+ Table = (FGTable*)0L;
+ LookupR = LookupC = 0;
+ numInstances = 0;
+ rows = columns = 0;
+
+ StaticValue = 0.0;
+ totalValue = 0.0;
+ bias = 0.0;
+ gain = 1.0;
+ SD = 0.0;
+
+ filename.erase();
+ description.erase();
+ name.erase();
+ method.erase();
+ multparms.erase();
+ multparmsRow.erase();
+ multparmsCol.erase();
+
+ Debug(0);
+}
- if (type == TABLE) {
- 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()];
+FGCoefficient::~FGCoefficient()
+{
+ if (Table) delete Table;
+ Debug(1);
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+bool FGCoefficient::Load(FGConfigFile *AC_cfg)
+{
+ int start, end, n;
+ string mult;
+
+ if (AC_cfg) {
+ name = AC_cfg->GetValue("NAME");
+ method = AC_cfg->GetValue("TYPE");
+ AC_cfg->GetNextConfigLine();
+ *AC_cfg >> description;
+ if (method == "EQUATION") type = EQUATION;
+ else if (method == "TABLE") type = TABLE;
+ else if (method == "VECTOR") type = VECTOR;
+ else if (method == "VALUE") type = VALUE;
+ else type = UNKNOWN;
+
+ if (type == VECTOR || type == TABLE) {
+ *AC_cfg >> rows;
+ if (type == TABLE) {
+ *AC_cfg >> columns;
+ Table = new FGTable(rows, columns);
} else {
- multipliers = atoi(strashcan.c_str());
+ Table = new FGTable(rows);
}
- cout << " Non-Dimensionalized by: ";
+ *AC_cfg >> multparmsRow;
+ LookupR = PropertyManager->GetNode( multparmsRow );
+ }
- mult_count = 0;
- if (multipliers & FG_QBAR) {
- mult_idx[mult_count] = FG_QBAR;
- mult_count++;
- cout << "qbar ";
- }
- if (multipliers & FG_WINGAREA) {
- mult_idx[mult_count] = FG_WINGAREA;
- mult_count++;
- cout << "S ";
- }
- if (multipliers & FG_WINGSPAN) {
- mult_idx[mult_count] = FG_WINGSPAN;
- mult_count++;
- cout << "b ";
- }
- if (multipliers & FG_CBAR) {
- mult_idx[mult_count] = FG_CBAR;
- mult_count++;
- cout << "c ";
- }
- if (multipliers & FG_ALPHA) {
- mult_idx[mult_count] = FG_ALPHA;
- mult_count++;
- cout << "alpha ";
- }
- if (multipliers & FG_ALPHADOT) {
- mult_idx[mult_count] = FG_ALPHADOT;
- mult_count++;
- cout << "alphadot ";
- }
- if (multipliers & FG_BETA) {
- mult_idx[mult_count] = FG_BETA;
- mult_count++;
- cout << "beta ";
- }
- if (multipliers & FG_BETADOT) {
- mult_idx[mult_count] = FG_BETADOT;
- mult_count++;
- cout << "betadot ";
- }
- if (multipliers & FG_PITCHRATE) {
- mult_idx[mult_count] = FG_PITCHRATE;
- mult_count++;
- cout << "q ";
- }
- if (multipliers & FG_ROLLRATE) {
- mult_idx[mult_count] = FG_ROLLRATE;
- mult_count++;
- cout << "p ";
- }
- if (multipliers & FG_YAWRATE) {
- mult_idx[mult_count] = FG_YAWRATE;
- mult_count++;
- cout << "r ";
- }
- if (multipliers & FG_ELEVATOR) {
- mult_idx[mult_count] = FG_ELEVATOR;
- mult_count++;
- cout << "De ";
- }
- if (multipliers & FG_AILERON) {
- mult_idx[mult_count] = FG_AILERON;
- mult_count++;
- cout << "Da ";
- }
- if (multipliers & FG_RUDDER) {
- mult_idx[mult_count] = FG_RUDDER;
- mult_count++;
- cout << "Dr ";
- }
- if (multipliers & FG_MACH) {
- mult_idx[mult_count] = FG_MACH;
- mult_count++;
- cout << "Mach ";
- }
- if (multipliers & FG_ALTITUDE) {
- mult_idx[mult_count] = FG_ALTITUDE;
- mult_count++;
- cout << "h ";
- }
- if (multipliers & FG_BI2VEL) {
- mult_idx[mult_count] = FG_BI2VEL;
- mult_count++;
- cout << "b /(2*Vt) ";
+ if (type == TABLE) {
+ *AC_cfg >> multparmsCol;
+
+ LookupC = PropertyManager->GetNode( multparmsCol );
+ }
+
+ // Here, read in the line of the form (e.g.) FG_MACH|FG_QBAR|FG_ALPHA
+ // where each non-dimensionalizing parameter for this coefficient is
+ // separated by a | character
+
+ string line=AC_cfg->GetCurrentLine();
+ unsigned j=0;
+ char tmp[255];
+ for(unsigned i=0;i<line.length(); i++ ) {
+ if( !isspace(line[i]) ) {
+ tmp[j]=line[i];
+ j++;
}
- if (multipliers & FG_CI2VEL) {
- mult_idx[mult_count] = FG_CI2VEL;
- mult_count++;
- cout << "c /(2*Vt) ";
+ }
+ tmp[j]='\0'; multparms=tmp;
+ end = multparms.length();
+
+ n = multparms.find("|");
+ start = 0;
+ if (multparms != string("none")) {
+ while (n < end && n >= 0) {
+ n -= start;
+ mult = multparms.substr(start,n);
+ multipliers.push_back( resolveSymbol( mult ) );
+ start += n+1;
+ n = multparms.find("|",start);
}
- cout << endl;
+ mult = multparms.substr(start,n);
+ multipliers.push_back( resolveSymbol( mult ) );
+ // End of non-dimensionalizing parameter read-in
+ }
+ AC_cfg->GetNextConfigLine();
+ if (type == VALUE) {
+ *AC_cfg >> StaticValue;
+ } else if (type == VECTOR || type == TABLE) {
+ *Table << *AC_cfg;
+ } else {
+ cerr << "Unimplemented coefficient type: " << type << endl;
+ }
- switch(type) {
- case VALUE:
- coeffDefFile >> StaticValue;
- cout << " Value = " << StaticValue << endl;
- break;
- case VECTOR:
- Allocate(rows,2);
+ AC_cfg->GetNextConfigLine();
+ FGCoefficient::Debug(2);
- for (r=1;r<=rows;r++) {
- coeffDefFile >> Table3D[r][0];
- coeffDefFile >> Table3D[r][1];
- }
+ return true;
+ } else {
+ return false;
+ }
+}
- for (r=0;r<=rows;r++) {
- cout << " ";
- for (c=0;c<=columns;c++) {
- cout << Table3D[r][c] << " ";
- }
- cout << endl;
- }
- break;
- 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++) {
- if ( c==1 ) coeffDefFile >> Table3D[r][0];
- else coeffDefFile >> ftrashcan;
- coeffDefFile >> Table3D[r][c];
- }
- }
- for (r=0;r<=rows;r++) {
- cout << " ";
- for (c=0;c<=columns;c++) {
- cout << Table3D[r][c] << " ";
- }
- cout << endl;
- }
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- break;
- }
- } else {
- cerr << "Empty file" << endl;
- }
+double FGCoefficient::Value(double rVal, double cVal)
+{
+ double Value;
+ unsigned int midx;
+
+ SD = Value = gain*Table->GetValue(rVal, cVal) + bias;
+
+ for (midx=0; midx < multipliers.size(); midx++) {
+ Value *= multipliers[midx]->getDoubleValue();
}
+ return Value;
}
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-FGCoefficient::~FGCoefficient(void)
+double FGCoefficient::Value(double Val)
{
+ double Value;
+
+ SD = Value = gain*Table->GetValue(Val) + bias;
+
+ for (unsigned int midx=0; midx < multipliers.size(); midx++)
+ Value *= multipliers[midx]->getDoubleValue();
+
+ return Value;
}
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-bool FGCoefficient::Allocate(int r, int c)
+double FGCoefficient::Value(void)
{
- rows = r;
- columns = c;
- Table3D = new float*[r+1];
- for (int i=0;i<=r;i++) Table3D[i] = new float[c+1];
- return true;
-}
+ double Value;
+ SD = Value = gain*StaticValue + bias;
-bool FGCoefficient::Allocate(int n)
-{
- rows = n;
- columns = 0;
- Table2D = new float[n+1];
- return true;
+ for (unsigned int midx=0; midx < multipliers.size(); midx++)
+ Value *= multipliers[midx]->getDoubleValue();
+
+ return Value;
}
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-float FGCoefficient::Value(float rVal, float cVal)
+double FGCoefficient::TotalValue(void)
{
- float rFactor, cFactor, col1temp, col2temp, Value;
- int r, c, midx;
-
- if (rows < 2 || columns < 2) return 0.0;
-
- for (r=1;r<=rows;r++) if (Table3D[r][0] >= rVal) break;
- for (c=1;c<=columns;c++) if (Table3D[0][c] >= cVal) break;
+ switch(type) {
- c = c < 2 ? 2 : (c > columns ? columns : c);
- r = r < 2 ? 2 : (r > rows ? rows : r);
+ case UNKNOWN:
+ totalValue = -1;
+ break;
- rFactor = (rVal - Table3D[r-1][0]) / (Table3D[r][0] - Table3D[r-1][0]);
- cFactor = (cVal - Table3D[0][c-1]) / (Table3D[0][c] - Table3D[0][c-1]);
+ case VALUE:
+ totalValue = Value();
+ break;
- col1temp = rFactor*(Table3D[r][c-1] - Table3D[r-1][c-1]) + Table3D[r-1][c-1];
- col2temp = rFactor*(Table3D[r][c] - Table3D[r-1][c]) + Table3D[r-1][c];
+ case VECTOR:
+ totalValue = Value( LookupR->getDoubleValue() );
+ break;
- Value = col1temp + cFactor*(col2temp - col1temp);
+ case TABLE:
+ totalValue = Value( LookupR->getDoubleValue(),
+ LookupC->getDoubleValue() );
+ break;
- for (midx=0;midx<mult_count;midx++) {
- Value *= GetCoeffVal(mult_idx[midx]);
+ case EQUATION:
+ totalValue = 0.0;
+ break;
}
-
- return Value;
+ return totalValue;
}
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-float FGCoefficient::Value(float Val)
+void FGCoefficient::DisplayCoeffFactors(void)
{
- float Factor, Value;
- int r, midx;
+ unsigned int i;
- if (rows < 2) return 0.0;
+ cout << " Non-Dimensionalized by: ";
- for (r=1;r<=rows;r++) if (Table3D[r][0] >= Val) break;
- r = r < 2 ? 2 : (r > rows ? rows : r);
-
- // make sure denominator below does not go to zero.
- if (Table3D[r][0] != Table3D[r-1][0]) {
- Factor = (Val - Table3D[r-1][0]) / (Table3D[r][0] - Table3D[r-1][0]);
+ if (multipliers.size() == 0) {
+ cout << "none" << endl;
} else {
- Factor = 1.0;
+ for (i=0; i<multipliers.size(); i++)
+ cout << multipliers[i]->getName() << " ";
}
+ cout << endl;
+}
- Value = Factor*(Table3D[r][1] - Table3D[r-1][1]) + Table3D[r-1][1];
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- for (midx=0;midx<mult_count;midx++) {
- Value *= GetCoeffVal(mult_idx[midx]);
- }
+string FGCoefficient::GetSDstring(void)
+{
+ char buffer[16];
+ string value;
- return Value;
+ sprintf(buffer,"%9.6f",SD);
+ value = string(buffer);
+ return value;
}
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-float FGCoefficient::Value(void)
+void FGCoefficient::bind(FGPropertyManager *parent)
{
- float Value;
- int midx;
-
- Value = StaticValue;
-
- for (midx=0;midx<mult_count;midx++) {
- Value *= GetCoeffVal(mult_idx[midx]);
+ string mult;
+ unsigned i;
+
+ node = parent->GetNode(name,true);
+
+ node->SetString("description",description);
+ if (LookupR) node->SetString("row-parm",LookupR->getName() );
+ if (LookupC) node->SetString("column-parm",LookupC->getName() );
+
+ mult="";
+ if (multipliers.size() == 0)
+ mult="none";
+
+ for (i=0; i<multipliers.size(); i++) {
+ mult += multipliers[i]->getName();
+ if ( i < multipliers.size()-1 ) mult += " ";
}
+ node->SetString("multipliers",mult);
+
+ node->Tie("SD-norm",this,&FGCoefficient::GetSD );
+ node->Tie("value-lbs",this,&FGCoefficient::GetValue );
+
+ node->Tie("bias", this, &FGCoefficient::getBias,
+ &FGCoefficient::setBias );
+
+ node->Tie("gain", this, &FGCoefficient::getGain,
+ &FGCoefficient::setGain );
- return Value;
}
-float FGCoefficient::TotalValue()
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+void FGCoefficient::unbind(void)
{
- switch(type) {
- case 0:
- return -1;
- case 1:
- return (Value());
- case 2:
- return (Value(GetCoeffVal(LookupR)));
- case 3:
- return (Value(GetCoeffVal(LookupR),GetCoeffVal(LookupC)));
- case 4:
- return 0.0;
- }
- return 0;
+ node->Untie("SD-norm");
+ node->Untie("value-lbs");
+ node->Untie("bias");
+ node->Untie("gain");
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+FGPropertyManager* FGCoefficient::resolveSymbol(string name)
+{
+ FGPropertyManager* tmpn;
+
+ tmpn = PropertyManager->GetNode(name,false);
+ if ( !tmpn ) {
+ cerr << "Coefficient multipliers cannot create properties, check spelling?" << endl;
+ exit(1);
+ }
+ return tmpn;
}
-float FGCoefficient::GetCoeffVal(int val_idx)
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+// The bitmasked value choices are as follows:
+// unset: In this case (the default) JSBSim would only print
+// out the normally expected messages, essentially echoing
+// the config files as they are read. If the environment
+// variable is not set, debug_lvl is set to 1 internally
+// 0: This requests JSBSim not to output any messages
+// whatsoever.
+// 1: This value explicity requests the normal JSBSim
+// startup messages
+// 2: This value asks for a message to be printed out when
+// a class is instantiated
+// 4: When this value is set, a message is displayed when a
+// FGModel object executes its Run() method
+// 8: When this value is set, various runtime state variables
+// are printed out periodically
+// 16: When set various parameters are sanity checked and
+// a message is printed out when they go out of bounds
+
+void FGCoefficient::Debug(int from)
{
- switch(val_idx) {
- case FG_QBAR:
- return State->Getqbar();
- case FG_WINGAREA:
- return Aircraft->GetWingArea();
- case FG_WINGSPAN:
- return Aircraft->GetWingSpan();
- case FG_CBAR:
- return Aircraft->Getcbar();
- case FG_ALPHA:
- return Translation->Getalpha();
- case FG_ALPHADOT:
- return State->Getadot();
- case FG_BETA:
- return Translation->Getbeta();
- case FG_BETADOT:
- return State->Getbdot();
- case FG_PITCHRATE:
- return Rotation->GetQ();
- case FG_ROLLRATE:
- return Rotation->GetP();
- case FG_YAWRATE:
- return Rotation->GetR();
- case FG_ELEVATOR:
- return FCS->GetDe();
- case FG_AILERON:
- return FCS->GetDa();
- case FG_RUDDER:
- return FCS->GetDr();
- case FG_MACH:
- return State->GetMach();
- case FG_ALTITUDE:
- return State->Geth();
- case FG_BI2VEL:
- return Aircraft->GetWingSpan()/(2.0 * State->GetVt());
- case FG_CI2VEL:
- return Aircraft->Getcbar()/(2.0 * State->GetVt());
+ if (debug_lvl <= 0) return;
+
+ if (debug_lvl & 1) { // Standard console startup message output
+
+ if (from == 2) { // Loading
+ cout << "\n " << highint << underon << name << underoff << normint << endl;
+ cout << " " << description << endl;
+ cout << " " << method << endl;
+
+ if (type == VECTOR || type == TABLE) {
+ cout << " Rows: " << rows << " ";
+ if (type == TABLE) {
+ cout << "Cols: " << columns;
+ }
+ cout << endl << " Row indexing parameter: " << LookupR->getName() << endl;
+ }
+
+ if (type == TABLE) {
+ cout << " Column indexing parameter: " << LookupC->getName() << endl;
+ }
+
+ if (type == VALUE) {
+ cout << " Value = " << StaticValue << endl;
+ } else if (type == VECTOR || type == TABLE) {
+ Table->Print();
+ }
+
+ DisplayCoeffFactors();
+ }
+ }
+ if (debug_lvl & 2 ) { // Instantiation/Destruction notification
+ if (from == 0) cout << "Instantiated: FGCoefficient" << endl;
+ if (from == 1) cout << "Destroyed: FGCoefficient" << endl;
+ }
+ if (debug_lvl & 4 ) { // Run() method entry print for FGModel-derived objects
+ }
+ if (debug_lvl & 8 ) { // Runtime state variables
+ }
+ if (debug_lvl & 16) { // Sanity checking
+ }
+ if (debug_lvl & 64) {
+ if (from == 0) { // Constructor
+ cout << IdSrc << endl;
+ cout << IdHdr << endl;
+ }
}
- return 0;
}
+} // namespace JSBSim