]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGCoefficient.cpp
Fix stall widths for the "auxilliary" (reverse flow) stalls so they
[flightgear.git] / src / FDM / JSBSim / FGCoefficient.cpp
index 849611ea0d27e43a254cec34403a7a57aa2c4df4..c003edd3d3be3b1f81465a3d7a16faef65d069ec 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Module:       FGCoefficient.cpp
  Author:       Jon S. Berndt
@@ -40,275 +40,479 @@ HISTORY
 --------------------------------------------------------------------------------
 12/28/98   JSB   Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+#include <stdio.h>
 
 #include "FGCoefficient.h"
 #include "FGState.h"
 #include "FGFDMExec.h"
+#include "FGPropertyManager.h"
+
+#ifndef FGFS
+#  if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
+#    include <iomanip.h>
+#  else
+#    include <iomanip>
+#  endif
+#else
+#  include STL_IOMANIP
+#endif
+
+namespace JSBSim {
+
+static const char *IdSrc = "$Id$";
+static const char *IdHdr = ID_COEFFICIENT;
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS IMPLEMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+FGCoefficient::FGCoefficient( FGFDMExec* fdex )
+{
+  FDMExec = fdex;
+  State   = FDMExec->GetState();
+  Table   = 0;
+  IsFactor = false;
+
+  PropertyManager = FDMExec->GetPropertyManager();
+
+  Table = (FGTable*)0L;
+  LookupR = LookupC = 0;
+  numInstances = 0;
+  rows = columns = tables = 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);
+}
 
-/*******************************************************************************
-************************************ CODE **************************************
-*******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-FGCoefficient::FGCoefficient(FGFDMExec* fdex, FGConfigFile* AC_cfg)
+FGCoefficient::~FGCoefficient()
 {
-  int r, c, start, end, n;
-  float ftrashcan;
-  string multparms;
+  if (Table) delete Table;
+  Debug(1);
+}
 
-  FDMExec     = fdex;
-  State       = FDMExec->GetState();
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+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;
-
-    cout << "   " << name << endl;
-    cout << "   " << description << endl;
-    cout << "   " << method << endl;
-
     if      (method == "EQUATION") type = EQUATION;
     else if (method == "TABLE")    type = TABLE;
+    else if (method == "TABLE3D")  type = TABLE3D;
     else if (method == "VECTOR")   type = VECTOR;
     else if (method == "VALUE")    type = VALUE;
     else                           type = UNKNOWN;
 
-    if (type == VECTOR || type == TABLE) {
-      *AC_cfg >> rows;
-      cout << "   Rows: " << rows << " ";
-      if (type == TABLE) {
-        *AC_cfg >> columns;
-        cout << "Cols: " << columns;
+    if (type == VECTOR || type == TABLE || type == TABLE3D) {
+
+      if (type == TABLE3D) {
+        *AC_cfg >> rows >> columns >> tables;
+        Table = new FGTable(rows, columns, tables);
+        *AC_cfg >> multparmsRow >> multparmsCol >> multparmsTable;
+        LookupR = PropertyManager->GetNode( multparmsRow );
+        LookupC = PropertyManager->GetNode( multparmsCol );
+        LookupT = PropertyManager->GetNode( multparmsTable );
+      } else if (type == TABLE) {
+        *AC_cfg >> rows >> columns;
+        Table = new FGTable(rows, columns);
+        *AC_cfg >> multparmsRow >> multparmsCol;
+        LookupR = PropertyManager->GetNode( multparmsRow );
+        LookupC = PropertyManager->GetNode( multparmsCol );
+      } else {
+        *AC_cfg >> rows;
+        Table = new FGTable(rows);
+        *AC_cfg >> multparmsRow;
+        LookupR = PropertyManager->GetNode( multparmsRow );
       }
+    }
 
-      cout << endl;
+    // Here, read in the line of the form:
+    // {property1} | {property2} | {property3}
+    // where each non-dimensionalizing property for this coefficient is
+    // separated by a | character
 
-      *AC_cfg >> multparms;
-      if (multparms.substr(0,1) == "F") {
-        LookupR = State->GetParameterIndex(multparms);
-        cout << "   Row indexing parameter: " << multparms << endl;
-      } else {
-        LookupR = atoi(multparms.c_str());
-        cout << "   Row indexing parameter: " << LookupR << endl;
+    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 (type == TABLE) {
-      *AC_cfg >> multparms;
-      if (multparms.substr(0,1) == "F") {
-        LookupC = State->GetParameterIndex(multparms);
-        cout << "   Column indexing parameter: " << multparms << endl;
-      } else {
-        LookupC = atoi(multparms.c_str());
-        cout << "   Column indexing parameter: " << LookupC << endl;
+    tmp[j]='\0'; multparms=tmp;
+    end = multparms.length();
+
+    n = multparms.find("|");
+    if (n == string::npos) n = end;
+    start = 0;
+    if (multparms != string("none")) {
+      while (n < end && n != string::npos) {
+        n -= start;
+        mult = multparms.substr(start,n);
+        multipliers.push_back( resolveSymbol( mult ) );
+        start += n+1;
+        n = multparms.find("|",start);
       }
+      mult = multparms.substr(start,n);
+      multipliers.push_back( resolveSymbol( mult ) );
+      // End of non-dimensionalizing parameter read-in
     }
+    AC_cfg->GetNextConfigLine();
 
-    // 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
-
-    *AC_cfg >> multparms;
+    if (type == VALUE) {
+      *AC_cfg >> StaticValue;
+    } else if (type == VECTOR || type == TABLE || type == TABLE3D) {
+      *Table << *AC_cfg;
+    } else {
+      cerr << "Unimplemented coefficient type: " << type << endl;
+    }
 
-    end   = multparms.length();
-    n     = multparms.find("|");
-    start = mult_count = multipliers = 0;
+    AC_cfg->GetNextConfigLine();
+    FGCoefficient::Debug(2);
 
-    while (n < end && n >= 0) {
-      n -= start;
-      mult_idx[mult_count] = State->GetParameterIndex(multparms.substr(start,n));
-      multipliers += mult_idx[mult_count];
-      mult_count++;
-      start += n+1;
-      n = multparms.find("|",start);
-    }
-    mult_idx[mult_count] = State->GetParameterIndex(multparms.substr(start,n));
-    multipliers += mult_idx[mult_count];
-    mult_count++;
+    return true;
+  } else {
+    return false;
+  }
+}
 
-    // End of non-dimensionalizing parameter read-in
 
-    switch(type) {
-    case VALUE:
-      *AC_cfg >> StaticValue;
-      cout << "      Value = " << StaticValue << endl;
-      break;
-    case VECTOR:
-      Allocate(rows,2);
-
-      for (r=1;r<=rows;r++) {
-        *AC_cfg >> Table3D[r][0];
-        *AC_cfg >> Table3D[r][1];
-      }
 
-      for (r=1;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++) {
-        *AC_cfg >> Table3D[0][c];
-        for (r=1;r<=rows;r++) {
-          if ( c==1 ) *AC_cfg >> Table3D[r][0];
-          else *AC_cfg >> ftrashcan;
-          *AC_cfg >> Table3D[r][c];
-        }
-      }
+double FGCoefficient::Value(double rVal, double cVal, double tVal)
+{
+  double Value;
+  unsigned int midx;
 
-      for (r=0;r<=rows;r++) {
-        cout << "      ";
-        for (c=0;c<=columns;c++) {
-          cout << Table3D[r][c] << "   ";
-        }
-        cout << endl;
-      }
+  SD = Value = gain*Table->GetValue(rVal, cVal, tVal) + bias;
 
-      break;
-    }
-    AC_cfg->GetNextConfigLine();
+  for (midx=0; midx < multipliers.size(); midx++) {
+      Value *= multipliers[midx]->getDoubleValue();
   }
+  return Value;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-FGCoefficient::~FGCoefficient(void)
+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;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-bool FGCoefficient::Allocate(int r, int c)
+double FGCoefficient::Value(double Val)
 {
-  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*Table->GetValue(Val) + bias;
+
+  for (unsigned int midx=0; midx < multipliers.size(); midx++)
+      Value *= multipliers[midx]->getDoubleValue();
+
+  return Value;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-bool FGCoefficient::Allocate(int n)
+double FGCoefficient::Value(void)
 {
-  rows = n;
-  columns = 0;
-  Table2D = new float[n+1];
-  return true;
+  double Value;
+
+  SD = Value = gain*StaticValue + bias;
+
+  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;
+  switch(type) {
 
-  for (r=1;r<=rows;r++) if (Table3D[r][0] >= rVal) break;
-  for (c=1;c<=columns;c++) if (Table3D[0][c] >= cVal) break;
+  case UNKNOWN:
+    totalValue = -1;
+    break;
 
-  c = c < 2 ? 2 : (c > columns ? columns : c);
-  r = r < 2 ? 2 : (r > rows    ? rows    : r);
+  case VALUE:
+    totalValue = Value();
+    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 VECTOR:
+    totalValue = Value( LookupR->getDoubleValue() );
+    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 TABLE:
+    totalValue = Value( LookupR->getDoubleValue(),
+                        LookupC->getDoubleValue() );
+    break;
 
-  SD = Value = col1temp + cFactor*(col2temp - col1temp);
+  case TABLE3D:
+    totalValue = Value( LookupR->getDoubleValue(),
+                        LookupC->getDoubleValue(),
+                        LookupT->getDoubleValue() );
+    break;
 
-  for (midx=0;midx<mult_count;midx++) {
-    Value *= State->GetParameter(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;
-
-  if (rows < 2) return 0.0;
+  unsigned int i;
 
-  for (r=1;r<=rows;r++) if (Table3D[r][0] >= Val) break;
-  r = r < 2 ? 2 : (r > rows    ? rows    : r);
+  cout << "   Non-Dimensionalized by: ";
 
-  // 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;
+}
 
-  SD = Value = Factor*(Table3D[r][1] - Table3D[r-1][1]) + Table3D[r-1][1];
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-  for (midx=0;midx<mult_count;midx++) {
-    Value *= State->GetParameter(mult_idx[midx]);
-  }
+string FGCoefficient::GetSDstring(void)
+{
+  char buffer[20];
+  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;
+  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() );
 
-       SD = Value = StaticValue;
+  mult="";
+  if (multipliers.size() == 0)
+    mult="none";
 
-  for (midx=0;midx<mult_count;midx++) {
-    Value *= State->GetParameter(mult_idx[midx]);
+  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(State->GetParameter(LookupR)));
-  case 3:
-    return (Value(State->GetParameter(LookupR),State->GetParameter(LookupC)));
-  case 4:
-    return 0.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 0;
+  return tmpn;
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-void FGCoefficient::DumpSD(void)
+void FGCoefficient::convert(string prop)
 {
-  cout << "   " << name << ": " << SD << endl;
+  if (IsFactor)
+    cout << "            <function name=\"aero/function/" << name << "\">" << endl;
+  else
+    cout << "            <function name=\"aero/coefficient/" << name << "\">" << endl;
+
+  cout << "                <description>" << description << "</description>" << endl;
+  cout << "                <product>" << endl;
+
+  for (int i=0; i<multipliers.size(); i++)
+    cout << "                    <property>" << (multipliers[i]->GetFullyQualifiedName()).substr(12) << "</property>" << endl;
+
+  if (!prop.empty())
+    cout << "                    <property>aero/function/" << prop << "</property>" << endl;
+
+  switch (type) {
+  case VALUE:
+  cout << "                    <value>" << StaticValue << "</value>" << endl;
+    break;
+
+  case VECTOR:
+    cout << "                      <table>" << endl;
+    cout << "                          <independentVar>" << (LookupR->GetFullyQualifiedName()).substr(12) << "</independentVar>" << endl;
+    cout << "                          <tableData>" << endl;
+    Table->Print(30);
+    cout << "                          </tableData>" << endl;
+    cout << "                      </table>" << endl;
+    break;
+
+  case TABLE:
+    cout << "                      <table>" << endl;
+    cout << "                          <independentVar lookup=\"row\">" << (LookupR->GetFullyQualifiedName()).substr(12) << "</independentVar>" << endl;
+    cout << "                          <independentVar lookup=\"column\">" << (LookupC->GetFullyQualifiedName()).substr(12) << "</independentVar>" << endl;
+    cout << "                          <tableData>" << endl;
+    Table->Print(30);
+    cout << "                          </tableData>" << endl;
+    cout << "                      </table>" << endl;
+    break;
+
+  case TABLE3D:
+    cout << "                      <table>" << endl;
+    cout << "                          <independentVar lookup=\"row\">" << (LookupR->GetFullyQualifiedName()).substr(12) << "</independentVar>" << endl;
+    cout << "                          <independentVar lookup=\"column\">" << (LookupC->GetFullyQualifiedName()).substr(12) << "</independentVar>" << endl;
+    cout << "                          <independentVar lookup=\"table\">" << (LookupT->GetFullyQualifiedName()).substr(12) << "</independentVar>" << endl;
+    cout << "                          <tableData>" << endl;
+    Table->Print(30);
+    cout << "                          </tableData>" << endl;
+    cout << "                      </table>" << endl;
+    break;
+
+  }
+
+  cout << "                </product>" << endl;
+  cout << "            </function>" << endl;
+
+  if (IsFactor) {
+  cout << " === MOVE THE ABOVE FACTOR " << name << " OUTSIDE OF AND BEFORE ANY <AXIS> DEFINITION ===" << endl;
+    for (int i=0; i<sum.size(); i++) {
+      sum[i]->convert(name);
+    }
+  }
 }
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+//    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)
+{
+  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 || type == TABLE3D) {
+        cout << "   Rows: " << rows << " indexed by: " << LookupR->getName() << endl;
+        if (type == TABLE || type == TABLE3D) {
+          cout << "   Cols: " << columns << " indexed by: " << LookupC->getName() << endl;
+          if (type == TABLE3D) {
+            cout << "   Tables: " << tables << " indexed by: " << LookupT->getName() << endl;
+          }
+        }
+        Table->Print();
+      } else if (type == VALUE) {
+        cout << "      Value = " << StaticValue << endl;
+      }
+
+      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;
+    }
+  }
+}
 
+} // namespace JSBSim