]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGOutput.cpp
Fix stall widths for the "auxilliary" (reverse flow) stalls so they
[flightgear.git] / src / FDM / JSBSim / FGOutput.cpp
index c82c43d934e8ddc18400083ab3c683b89ae706a8..dc3e43facb197af9cf7cd35e5a06df378193b1c4 100644 (file)
@@ -28,7 +28,7 @@
 FUNCTIONAL DESCRIPTION
 --------------------------------------------------------------------------------
 This is the place where you create output routines to dump data for perusal
-later. 
+later.
 
 HISTORY
 --------------------------------------------------------------------------------
@@ -47,10 +47,13 @@ INCLUDES
 #include "FGGroundReactions.h"
 #include "FGAircraft.h"
 #include "FGMassBalance.h"
-#include "FGTranslation.h"
-#include "FGRotation.h"
-#include "FGPosition.h"
+#include "FGPropagate.h"
 #include "FGAuxiliary.h"
+#include "FGInertial.h"
+
+#include <iomanip>
+
+namespace JSBSim {
 
 static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_OUTPUT;
@@ -65,10 +68,12 @@ FGOutput::FGOutput(FGFDMExec* fdmex) : FGModel(fdmex)
   sFirstPass = dFirstPass = true;
   socket = 0;
   Type = otNone;
-  Filename = "JSBSim.out";
+  Filename = "";
   SubSystems = 0;
   enabled = true;
-  
+  outputInFileName = "";
+  delimeter = ", ";
+
   Debug(0);
 }
 
@@ -77,6 +82,8 @@ FGOutput::FGOutput(FGFDMExec* fdmex) : FGModel(fdmex)
 FGOutput::~FGOutput()
 {
   if (socket) delete socket;
+  for (unsigned int i=0; i<OutputProperties.size(); i++) delete OutputProperties[i];
+
   Debug(1);
 }
 
@@ -85,21 +92,17 @@ FGOutput::~FGOutput()
 bool FGOutput::Run(void)
 {
   if (enabled) {
-    if (!FGModel::Run()) {
-
-      if (Type == otSocket) {
-        SocketOutput();
-      } else if (Type == otCSV) {
-        DelimitedOutput(Filename);
-      } else if (Type == otTerminal) {
-        // Not done yet
-      } else if (Type == otNone) {
-        // Do nothing
-      } else {
-        // Not a valid type of output
-      }
-
+    if (FGModel::Run()) return true;
+    if (Type == otSocket) {
+      SocketOutput();
+    } else if (Type == otCSV || Type == otTab) {
+      DelimitedOutput(Filename);
+    } else if (Type == otTerminal) {
+      // Not done yet
+    } else if (Type == otNone) {
+      // Do nothing
     } else {
+      // Not a valid type of output
     }
   }
   return false;
@@ -111,13 +114,15 @@ void FGOutput::SetType(string type)
 {
   if (type == "CSV") {
     Type = otCSV;
+    delimeter = ", ";
   } else if (type == "TABULAR") {
     Type = otTab;
+    delimeter = "\t";
   } else if (type == "SOCKET") {
     Type = otSocket;
   } else if (type == "TERMINAL") {
     Type = otTerminal;
-  } else if (type != string("NONE")){
+  } else if (type != string("NONE")) {
     Type = otUnknown;
     cerr << "Unknown type of output specified in config file" << endl;
   }
@@ -128,6 +133,7 @@ void FGOutput::SetType(string type)
 void FGOutput::DelimitedOutput(string fname)
 {
   streambuf* buffer;
+  string scratch = "";
 
   if (fname == "COUT" || fname == "cout") {
     buffer = cout.rdbuf();
@@ -144,76 +150,90 @@ void FGOutput::DelimitedOutput(string fname)
       // Nothing here, yet
     }
     if (SubSystems & ssAerosurfaces) {
-      outstream << ", ";
-      outstream << "Aileron Cmd, ";
-      outstream << "Elevator Cmd, ";
-      outstream << "Rudder Cmd, ";
-      outstream << "Flap Cmd, ";
-      outstream << "Left Aileron Pos, ";
-      outstream << "Right Aileron Pos, ";
-      outstream << "Elevator Pos, ";
-      outstream << "Rudder Pos, ";
-      outstream << "Flap Pos"; 
+      outstream << delimeter;
+      outstream << "Aileron Cmd" + delimeter;
+      outstream << "Elevator Cmd" + delimeter;
+      outstream << "Rudder Cmd" + delimeter;
+      outstream << "Flap Cmd" + delimeter;
+      outstream << "Left Aileron Pos" + delimeter;
+      outstream << "Right Aileron Pos" + delimeter;
+      outstream << "Elevator Pos" + delimeter;
+      outstream << "Rudder Pos" + delimeter;
+      outstream << "Flap Pos";
     }
     if (SubSystems & ssRates) {
-      outstream << ", ";
-      outstream << "P, Q, R, ";
-      outstream << "Pdot, Qdot, Rdot";
+      outstream << delimeter;
+      outstream << "P" + delimeter + "Q" + delimeter + "R" + delimeter;
+      outstream << "Pdot" + delimeter + "Qdot" + delimeter + "Rdot";
     }
     if (SubSystems & ssVelocities) {
-      outstream << ", ";
-      outstream << "QBar, ";
-      outstream << "Vtotal, ";
-      outstream << "UBody, VBody, WBody, ";
-      outstream << "UAero, VAero, WAero, ";
-      outstream << "Vn, Ve, Vd";
+      outstream << delimeter;
+      outstream << "QBar" + delimeter;
+      outstream << "Vtotal" + delimeter;
+      outstream << "UBody" + delimeter + "VBody" + delimeter + "WBody" + delimeter;
+      outstream << "UAero" + delimeter + "VAero" + delimeter + "WAero" + delimeter;
+      outstream << "Vn" + delimeter + "Ve" + delimeter + "Vd";
     }
     if (SubSystems & ssForces) {
-      outstream << ", ";
-      outstream << "Drag, Side, Lift, ";
-      outstream << "L/D, ";
-      outstream << "Xforce, Yforce, Zforce";
+      outstream << delimeter;
+      outstream << "Drag" + delimeter + "Side" + delimeter + "Lift" + delimeter;
+      outstream << "L/D" + delimeter;
+      outstream << "Xforce" + delimeter + "Yforce" + delimeter + "Zforce";
     }
     if (SubSystems & ssMoments) {
-      outstream << ", ";
-      outstream << "L, M, N";
+      outstream << delimeter;
+      outstream << "L" + delimeter + "M" + delimeter + "N";
     }
     if (SubSystems & ssAtmosphere) {
-      outstream << ", ";
-      outstream << "Rho, ";
-      outstream << "NWind, EWind, DWind";
+      outstream << delimeter;
+      outstream << "Rho" + delimeter;
+      outstream << "NWind" + delimeter + "EWind" + delimeter + "DWind";
     }
     if (SubSystems & ssMassProps) {
-      outstream << ", ";
-      outstream << "Ixx, ";
-      outstream << "Iyy, ";
-      outstream << "Izz, ";
-      outstream << "Ixz, ";
-      outstream << "Mass, ";
-      outstream << "Xcg, Ycg, Zcg";
-    }
-    if (SubSystems & ssPosition) {
-      outstream << ", ";
-      outstream << "Altitude, ";
-      outstream << "Phi, Tht, Psi, ";
-      outstream << "Alpha, ";
-      outstream << "Beta, ";
-      outstream << "Latitude, ";
-      outstream << "Longitude, ";
-      outstream << "Distance AGL, ";
+      outstream << delimeter;
+      outstream << "Ixx" + delimeter;
+      outstream << "Ixy" + delimeter;
+      outstream << "Ixz" + delimeter;
+      outstream << "Iyx" + delimeter;
+      outstream << "Iyy" + delimeter;
+      outstream << "Iyz" + delimeter;
+      outstream << "Izx" + delimeter;
+      outstream << "Izy" + delimeter;
+      outstream << "Izz" + delimeter;
+      outstream << "Mass" + delimeter;
+      outstream << "Xcg" + delimeter + "Ycg" + delimeter + "Zcg";
+    }
+    if (SubSystems & ssPropagate) {
+      outstream << delimeter;
+      outstream << "Altitude" + delimeter;
+      outstream << "Phi" + delimeter + "Tht" + delimeter + "Psi" + delimeter;
+      outstream << "Alpha" + delimeter;
+      outstream << "Beta" + delimeter;
+      outstream << "Latitude (Deg)" + delimeter;
+      outstream << "Longitude (Deg)" + delimeter;
+      outstream << "Distance AGL" + delimeter;
       outstream << "Runway Radius";
     }
     if (SubSystems & ssCoefficients) {
-      outstream << ", ";
-      outstream << Aerodynamics->GetCoefficientStrings();
+      scratch = Aerodynamics->GetCoefficientStrings(delimeter);
+      if (scratch.length() != 0) outstream << delimeter << scratch;
+    }
+    if (SubSystems & ssFCS) {
+      scratch = FCS->GetComponentStrings(delimeter);
+      if (scratch.length() != 0) outstream << delimeter << scratch;
     }
     if (SubSystems & ssGroundReactions) {
-      outstream << ", ";
-      outstream << GroundReactions->GetGroundReactionStrings();
+      outstream << delimeter;
+      outstream << GroundReactions->GetGroundReactionStrings(delimeter);
     }
     if (SubSystems & ssPropulsion && Propulsion->GetNumEngines() > 0) {
-      outstream << ", ";
-      outstream << Propulsion->GetPropulsionStrings();
+      outstream << delimeter;
+      outstream << Propulsion->GetPropulsionStrings(delimeter);
+    }
+    if (OutputProperties.size() > 0) {
+      for (unsigned int i=0;i<OutputProperties.size();i++) {
+        outstream << delimeter << OutputProperties[i]->GetName();
+      }
     }
 
     outstream << endl;
@@ -224,76 +244,81 @@ void FGOutput::DelimitedOutput(string fname)
   if (SubSystems & ssSimulation) {
   }
   if (SubSystems & ssAerosurfaces) {
-    outstream << ", ";
-    outstream << FCS->GetDaCmd() << ", ";
-    outstream << FCS->GetDeCmd() << ", ";
-    outstream << FCS->GetDrCmd() << ", ";
-    outstream << FCS->GetDfCmd() << ", ";
-    outstream << FCS->GetDaLPos() << ", ";
-    outstream << FCS->GetDaRPos() << ", ";
-    outstream << FCS->GetDePos() << ", ";
-    outstream << FCS->GetDrPos() << ", ";
+    outstream << delimeter;
+    outstream << FCS->GetDaCmd() << delimeter;
+    outstream << FCS->GetDeCmd() << delimeter;
+    outstream << FCS->GetDrCmd() << delimeter;
+    outstream << FCS->GetDfCmd() << delimeter;
+    outstream << FCS->GetDaLPos() << delimeter;
+    outstream << FCS->GetDaRPos() << delimeter;
+    outstream << FCS->GetDePos() << delimeter;
+    outstream << FCS->GetDrPos() << delimeter;
     outstream << FCS->GetDfPos();
   }
   if (SubSystems & ssRates) {
-    outstream << ", ";
-    outstream << Rotation->GetPQR() << ", ";
-    outstream << Rotation->GetPQRdot();
+    outstream << delimeter;
+    outstream << Propagate->GetPQR().Dump(delimeter) << delimeter;
+    outstream << Propagate->GetPQRdot().Dump(delimeter);
   }
   if (SubSystems & ssVelocities) {
-    outstream << ", ";
-    outstream << Translation->Getqbar() << ", ";
-    outstream << Translation->GetVt() << ", ";
-    outstream << Translation->GetUVW() << ", ";
-    outstream << Translation->GetvAeroUVW() << ", ";
-    outstream << Position->GetVel();
+    outstream << delimeter;
+    outstream << Auxiliary->Getqbar() << delimeter;
+    outstream << setprecision(12) << Auxiliary->GetVt() << delimeter;
+    outstream << setprecision(12) << Propagate->GetUVW().Dump(delimeter) << delimeter;
+    outstream << Auxiliary->GetAeroUVW().Dump(delimeter) << delimeter;
+    outstream << Propagate->GetVel().Dump(delimeter);
   }
   if (SubSystems & ssForces) {
-    outstream << ", ";
-    outstream << Aerodynamics->GetvFs() << ", ";
-    outstream << Aerodynamics->GetLoD() << ", ";
-    outstream << Aircraft->GetForces();
+    outstream << delimeter;
+    outstream << Aerodynamics->GetvFs() << delimeter;
+    outstream << Aerodynamics->GetLoD() << delimeter;
+    outstream << Aircraft->GetForces().Dump(delimeter);
   }
   if (SubSystems & ssMoments) {
-    outstream << ", ";
-    outstream << Aircraft->GetMoments();
+    outstream << delimeter;
+    outstream << Aircraft->GetMoments().Dump(delimeter);
   }
   if (SubSystems & ssAtmosphere) {
-    outstream << ", ";
-    outstream << Atmosphere->GetDensity() << ", ";
-    outstream << Atmosphere->GetWindNED();
+    outstream << delimeter;
+    outstream << Atmosphere->GetDensity() << delimeter;
+    outstream << Atmosphere->GetWindNED().Dump(delimeter);
   }
   if (SubSystems & ssMassProps) {
-    outstream << ", ";
-    outstream << MassBalance->GetIxx() << ", ";
-    outstream << MassBalance->GetIyy() << ", ";
-    outstream << MassBalance->GetIzz() << ", ";
-    outstream << MassBalance->GetIxz() << ", ";
-    outstream << MassBalance->GetMass() << ", ";
+    outstream << delimeter;
+    outstream << MassBalance->GetJ() << delimeter;
+    outstream << MassBalance->GetMass() << delimeter;
     outstream << MassBalance->GetXYZcg();
   }
-  if (SubSystems & ssPosition) {
-    outstream << ", ";
-    outstream << Position->Geth() << ", ";
-    outstream << Rotation->GetEuler() << ", ";
-    outstream << Translation->Getalpha() << ", ";
-    outstream << Translation->Getbeta() << ", ";
-    outstream << Position->GetLatitude() << ", ";
-    outstream << Position->GetLongitude() << ", ";
-    outstream << Position->GetDistanceAGL() << ", ";
-    outstream << Position->GetRunwayRadius();
+  if (SubSystems & ssPropagate) {
+    outstream << delimeter;
+    outstream << Propagate->Geth() << delimeter;
+    outstream << Propagate->GetEuler().Dump(delimeter) << delimeter;
+    outstream << Auxiliary->Getalpha(inDegrees) << delimeter;
+    outstream << Auxiliary->Getbeta(inDegrees) << delimeter;
+    outstream << Propagate->GetLocation().GetLatitudeDeg() << delimeter;
+    outstream << Propagate->GetLocation().GetLongitudeDeg() << delimeter;
+    outstream << Propagate->GetDistanceAGL() << delimeter;
+    outstream << Propagate->GetRunwayRadius();
   }
   if (SubSystems & ssCoefficients) {
-    outstream << ", ";
-    outstream << Aerodynamics->GetCoefficientValues();
+    scratch = Aerodynamics->GetCoefficientValues(delimeter);
+    if (scratch.length() != 0) outstream << delimeter << scratch;
+  }
+  if (SubSystems & ssFCS) {
+    scratch = FCS->GetComponentValues(delimeter);
+    if (scratch.length() != 0) outstream << delimeter << scratch;
   }
   if (SubSystems & ssGroundReactions) {
-    outstream << ", ";
-    outstream << GroundReactions->GetGroundReactionValues();
+    outstream << delimeter;
+    outstream << GroundReactions->GetGroundReactionValues(delimeter);
   }
   if (SubSystems & ssPropulsion && Propulsion->GetNumEngines() > 0) {
-    outstream << ", ";
-    outstream << Propulsion->GetPropulsionValues();
+    outstream << delimeter;
+    outstream << Propulsion->GetPropulsionValues(delimeter);
+  }
+
+  for (unsigned int i=0;i<OutputProperties.size();i++) {
+    outstream << delimeter << OutputProperties[i]->getDoubleValue();
   }
 
   outstream << endl;
@@ -340,8 +365,8 @@ void FGOutput::SocketOutput(void)
     socket->Append("Fx");
     socket->Append("Fy");
     socket->Append("Fz");
-    socket->Append("Latitude");
-    socket->Append("Longitude");
+    socket->Append("Latitude (Deg)");
+    socket->Append("Longitude (Deg)");
     socket->Append("QBar");
     socket->Append("Alpha");
     socket->Append("L");
@@ -358,37 +383,37 @@ void FGOutput::SocketOutput(void)
 
   socket->Clear();
   socket->Append(State->Getsim_time());
-  socket->Append(Position->Geth());
-  socket->Append(Rotation->Getphi());
-  socket->Append(Rotation->Gettht());
-  socket->Append(Rotation->Getpsi());
+  socket->Append(Propagate->Geth());
+  socket->Append(Propagate->GetEuler(ePhi));
+  socket->Append(Propagate->GetEuler(eTht));
+  socket->Append(Propagate->GetEuler(ePsi));
   socket->Append(Atmosphere->GetDensity());
-  socket->Append(Translation->GetVt());
-  socket->Append(Translation->GetUVW(eU));
-  socket->Append(Translation->GetUVW(eV));
-  socket->Append(Translation->GetUVW(eW));
-  socket->Append(Translation->GetvAeroUVW(eU));
-  socket->Append(Translation->GetvAeroUVW(eV));
-  socket->Append(Translation->GetvAeroUVW(eW));
-  socket->Append(Position->GetVn());
-  socket->Append(Position->GetVe());
-  socket->Append(Position->GetVd());
-  socket->Append(Translation->GetUVWdot(eU));
-  socket->Append(Translation->GetUVWdot(eV));
-  socket->Append(Translation->GetUVWdot(eW));
-  socket->Append(Rotation->GetPQR(eP));
-  socket->Append(Rotation->GetPQR(eQ));
-  socket->Append(Rotation->GetPQR(eR));
-  socket->Append(Rotation->GetPQRdot(eP));
-  socket->Append(Rotation->GetPQRdot(eQ));
-  socket->Append(Rotation->GetPQRdot(eR));
+  socket->Append(Auxiliary->GetVt());
+  socket->Append(Propagate->GetUVW(eU));
+  socket->Append(Propagate->GetUVW(eV));
+  socket->Append(Propagate->GetUVW(eW));
+  socket->Append(Auxiliary->GetAeroUVW(eU));
+  socket->Append(Auxiliary->GetAeroUVW(eV));
+  socket->Append(Auxiliary->GetAeroUVW(eW));
+  socket->Append(Propagate->GetVel(eNorth));
+  socket->Append(Propagate->GetVel(eEast));
+  socket->Append(Propagate->GetVel(eDown));
+  socket->Append(Propagate->GetUVWdot(eU));
+  socket->Append(Propagate->GetUVWdot(eV));
+  socket->Append(Propagate->GetUVWdot(eW));
+  socket->Append(Propagate->GetPQR(eP));
+  socket->Append(Propagate->GetPQR(eQ));
+  socket->Append(Propagate->GetPQR(eR));
+  socket->Append(Propagate->GetPQRdot(eP));
+  socket->Append(Propagate->GetPQRdot(eQ));
+  socket->Append(Propagate->GetPQRdot(eR));
   socket->Append(Aircraft->GetForces(eX));
   socket->Append(Aircraft->GetForces(eY));
   socket->Append(Aircraft->GetForces(eZ));
-  socket->Append(Position->GetLatitude());
-  socket->Append(Position->GetLongitude());
-  socket->Append(Translation->Getqbar());
-  socket->Append(Translation->Getalpha());
+  socket->Append(Propagate->GetLocation().GetLatitudeDeg());
+  socket->Append(Propagate->GetLocation().GetLongitudeDeg());
+  socket->Append(Auxiliary->Getqbar());
+  socket->Append(Auxiliary->Getalpha(inDegrees));
   socket->Append(Aircraft->GetMoments(eL));
   socket->Append(Aircraft->GetMoments(eM));
   socket->Append(Aircraft->GetMoments(eN));
@@ -418,82 +443,113 @@ void FGOutput::SocketStatusOutput(string out_str)
 
 bool FGOutput::Load(FGConfigFile* AC_cfg)
 {
-  string token, parameter;
+  string token="", parameter="", separator="";
+  string name="", fname="";
   int OutRate = 0;
-
-  token = AC_cfg->GetValue("NAME");
-  Output->SetFilename(token);
+  FGConfigFile* Output_cfg;
+  string property;
+  unsigned int port;
+
+# ifndef macintosh
+    separator = "/";
+# else
+    separator = ";";
+# endif
+
+  name = AC_cfg->GetValue("NAME");
+  fname = AC_cfg->GetValue("FILE");
   token = AC_cfg->GetValue("TYPE");
+  port = atoi(AC_cfg->GetValue("PORT").c_str());
+
   Output->SetType(token);
 
-#if defined( FG_WITH_JSBSIM_SOCKET ) || !defined( FGFS )
   if (token == "SOCKET") {
-    socket = new FGfdmSocket("localhost",1138);
+    socket = new FGfdmSocket(name,port);
   }
-#endif
-  
-  AC_cfg->GetNextConfigLine();
 
-  while ((token = AC_cfg->GetValue()) != string("/OUTPUT")) {
-    *AC_cfg >> parameter;
-    if (parameter == "RATE_IN_HZ") *AC_cfg >> OutRate;
+  if (!fname.empty()) {
+    outputInFileName = FDMExec->GetAircraftPath() + separator
+                        + FDMExec->GetModelName() + separator + fname + ".xml";
+    Output_cfg = new FGConfigFile(outputInFileName);
+    if (!Output_cfg->IsOpen()) {
+      cerr << "Could not open file: " << outputInFileName << endl;
+      return false;
+    }
+  } else {
+    Output_cfg = AC_cfg;
+  }
+  Output->SetFilename(name);
+
+  while ((token = Output_cfg->GetValue()) != string("/OUTPUT")) {
+    *Output_cfg >> parameter;
+    if (parameter == "RATE_IN_HZ") {
+      *Output_cfg >> OutRate;
+    }
     if (parameter == "SIMULATION") {
-      *AC_cfg >> parameter;
+      *Output_cfg >> parameter;
       if (parameter == "ON") SubSystems += ssSimulation;
     }
     if (parameter == "AEROSURFACES") {
-      *AC_cfg >> parameter;
+      *Output_cfg >> parameter;
       if (parameter == "ON") SubSystems += ssAerosurfaces;
     }
     if (parameter == "RATES") {
-      *AC_cfg >> parameter;
+      *Output_cfg >> parameter;
       if (parameter == "ON") SubSystems += ssRates;
     }
     if (parameter == "VELOCITIES") {
-      *AC_cfg >> parameter;
+      *Output_cfg >> parameter;
       if (parameter == "ON") SubSystems += ssVelocities;
     }
     if (parameter == "FORCES") {
-      *AC_cfg >> parameter;
+      *Output_cfg >> parameter;
       if (parameter == "ON") SubSystems += ssForces;
     }
     if (parameter == "MOMENTS") {
-      *AC_cfg >> parameter;
+      *Output_cfg >> parameter;
       if (parameter == "ON") SubSystems += ssMoments;
     }
     if (parameter == "ATMOSPHERE") {
-      *AC_cfg >> parameter;
+      *Output_cfg >> parameter;
       if (parameter == "ON") SubSystems += ssAtmosphere;
     }
     if (parameter == "MASSPROPS") {
-      *AC_cfg >> parameter;
+      *Output_cfg >> parameter;
       if (parameter == "ON") SubSystems += ssMassProps;
     }
     if (parameter == "POSITION") {
-      *AC_cfg >> parameter;
-      if (parameter == "ON") SubSystems += ssPosition;
+      *Output_cfg >> parameter;
+      if (parameter == "ON") SubSystems += ssPropagate;
     }
     if (parameter == "COEFFICIENTS") {
-      *AC_cfg >> parameter;
+      *Output_cfg >> parameter;
       if (parameter == "ON") SubSystems += ssCoefficients;
     }
     if (parameter == "GROUND_REACTIONS") {
-      *AC_cfg >> parameter;
+      *Output_cfg >> parameter;
       if (parameter == "ON") SubSystems += ssGroundReactions;
     }
     if (parameter == "FCS") {
-      *AC_cfg >> parameter;
+      *Output_cfg >> parameter;
       if (parameter == "ON") SubSystems += ssFCS;
     }
     if (parameter == "PROPULSION") {
-      *AC_cfg >> parameter;
+      *Output_cfg >> parameter;
       if (parameter == "ON") SubSystems += ssPropulsion;
     }
+    if (parameter == "PROPERTY") {
+      *Output_cfg >> property;
+      OutputProperties.push_back(PropertyManager->GetNode(property));
+    }
+
+    if (parameter == "EOF") break;
   }
 
   OutRate = OutRate>120?120:(OutRate<0?0:OutRate);
   rate = (int)(0.5 + 1.0/(State->Getdt()*OutRate));
 
+  Debug(2);
+
   return true;
 }
 
@@ -518,12 +574,52 @@ bool FGOutput::Load(FGConfigFile* AC_cfg)
 
 void FGOutput::Debug(int from)
 {
+  string scratch="";
+
   if (debug_lvl <= 0) return;
 
   if (debug_lvl & 1) { // Standard console startup message output
     if (from == 0) { // Constructor
 
     }
+    if (from == 2) {
+      if (outputInFileName.empty())
+        cout << "  " << "Output parameters read inline" << endl;
+      else
+        cout << "    Output parameters read from file: " << outputInFileName << endl;
+
+      if (Filename == "cout" || Filename == "COUT") {
+        scratch = "    Log output goes to screen console";
+      } else if (!Filename.empty()) {
+        scratch = "    Log output goes to file: " + Filename;
+      }
+      switch (Type) {
+      case otCSV:
+        cout << scratch << " in CSV format output at rate " << 120/rate << " Hz" << endl;
+        break;
+      case otNone:
+        cout << "  No log output" << endl;
+        break;
+      }
+
+      if (SubSystems & ssSimulation)      cout << "    Simulation parameters logged" << endl;
+      if (SubSystems & ssAerosurfaces)    cout << "    Aerosurface parameters logged" << endl;
+      if (SubSystems & ssRates)           cout << "    Rate parameters logged" << endl;
+      if (SubSystems & ssVelocities)      cout << "    Velocity parameters logged" << endl;
+      if (SubSystems & ssForces)          cout << "    Force parameters logged" << endl;
+      if (SubSystems & ssMoments)         cout << "    Moments parameters logged" << endl;
+      if (SubSystems & ssAtmosphere)      cout << "    Atmosphere parameters logged" << endl;
+      if (SubSystems & ssMassProps)       cout << "    Mass parameters logged" << endl;
+      if (SubSystems & ssCoefficients)    cout << "    Coefficient parameters logged" << endl;
+      if (SubSystems & ssPropagate)       cout << "    Propagate parameters logged" << endl;
+      if (SubSystems & ssGroundReactions) cout << "    Ground parameters logged" << endl;
+      if (SubSystems & ssFCS)             cout << "    FCS parameters logged" << endl;
+      if (SubSystems & ssPropulsion)      cout << "    Propulsion parameters logged" << endl;
+      if (OutputProperties.size() > 0)    cout << "    Properties logged:" << endl;
+      for (unsigned int i=0;i<OutputProperties.size();i++) {
+        cout << "      - " << OutputProperties[i]->GetName() << endl;
+      }
+    }
   }
   if (debug_lvl & 2 ) { // Instantiation/Destruction notification
     if (from == 0) cout << "Instantiated: FGOutput" << endl;
@@ -542,4 +638,4 @@ void FGOutput::Debug(int from)
     }
   }
 }
-
+}