]> git.mxchange.org Git - flightgear.git/blob - src/FDM/JSBSim/FGOutput.cpp
Mathias Fröhlich:
[flightgear.git] / src / FDM / JSBSim / FGOutput.cpp
1 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
3  Module:       FGOutput.cpp
4  Author:       Jon Berndt
5  Date started: 12/02/98
6  Purpose:      Manage output of sim parameters to file or stdout
7  Called by:    FGSimExec
8
9  ------------- Copyright (C) 1999  Jon S. Berndt (jsb@hal-pc.org) -------------
10
11  This program is free software; you can redistribute it and/or modify it under
12  the terms of the GNU General Public License as published by the Free Software
13  Foundation; either version 2 of the License, or (at your option) any later
14  version.
15
16  This program is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
19  details.
20
21  You should have received a copy of the GNU General Public License along with
22  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
23  Place - Suite 330, Boston, MA  02111-1307, USA.
24
25  Further information about the GNU General Public License can also be found on
26  the world wide web at http://www.gnu.org.
27
28 FUNCTIONAL DESCRIPTION
29 --------------------------------------------------------------------------------
30 This is the place where you create output routines to dump data for perusal
31 later.
32
33 HISTORY
34 --------------------------------------------------------------------------------
35 12/02/98   JSB   Created
36
37 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
38 INCLUDES
39 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
40
41 #include "FGOutput.h"
42 #include "FGState.h"
43 #include "FGFDMExec.h"
44 #include "FGAtmosphere.h"
45 #include "FGFCS.h"
46 #include "FGAerodynamics.h"
47 #include "FGGroundReactions.h"
48 #include "FGAircraft.h"
49 #include "FGMassBalance.h"
50 #include "FGPropagate.h"
51 #include "FGAuxiliary.h"
52 #include "FGInertial.h"
53
54 #include <iomanip>
55
56 namespace JSBSim {
57
58 static const char *IdSrc = "$Id$";
59 static const char *IdHdr = ID_OUTPUT;
60
61 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
62 CLASS IMPLEMENTATION
63 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
64
65 FGOutput::FGOutput(FGFDMExec* fdmex) : FGModel(fdmex)
66 {
67   Name = "FGOutput";
68   sFirstPass = dFirstPass = true;
69   socket = 0;
70   Type = otNone;
71   Filename = "";
72   SubSystems = 0;
73   enabled = true;
74   outputInFileName = "";
75   delimeter = ", ";
76
77   Debug(0);
78 }
79
80 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
81
82 FGOutput::~FGOutput()
83 {
84   if (socket) delete socket;
85   for (unsigned int i=0; i<OutputProperties.size(); i++) delete OutputProperties[i];
86
87   Debug(1);
88 }
89
90 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
91
92 bool FGOutput::Run(void)
93 {
94   if (enabled) {
95     if (FGModel::Run()) return true;
96     if (Type == otSocket) {
97       SocketOutput();
98     } else if (Type == otCSV || Type == otTab) {
99       DelimitedOutput(Filename);
100     } else if (Type == otTerminal) {
101       // Not done yet
102     } else if (Type == otNone) {
103       // Do nothing
104     } else {
105       // Not a valid type of output
106     }
107   }
108   return false;
109 }
110
111 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
112
113 void FGOutput::SetType(string type)
114 {
115   if (type == "CSV") {
116     Type = otCSV;
117     delimeter = ", ";
118   } else if (type == "TABULAR") {
119     Type = otTab;
120     delimeter = "\t";
121   } else if (type == "SOCKET") {
122     Type = otSocket;
123   } else if (type == "TERMINAL") {
124     Type = otTerminal;
125   } else if (type != string("NONE")) {
126     Type = otUnknown;
127     cerr << "Unknown type of output specified in config file" << endl;
128   }
129 }
130
131 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
132
133 void FGOutput::DelimitedOutput(string fname)
134 {
135   streambuf* buffer;
136   string scratch = "";
137
138   if (fname == "COUT" || fname == "cout") {
139     buffer = cout.rdbuf();
140   } else {
141     datafile.open(fname.c_str());
142     buffer = datafile.rdbuf();
143   }
144
145   ostream outstream(buffer);
146
147   if (dFirstPass) {
148     outstream << "Time";
149     if (SubSystems & ssSimulation) {
150       // Nothing here, yet
151     }
152     if (SubSystems & ssAerosurfaces) {
153       outstream << delimeter;
154       outstream << "Aileron Cmd" + delimeter;
155       outstream << "Elevator Cmd" + delimeter;
156       outstream << "Rudder Cmd" + delimeter;
157       outstream << "Flap Cmd" + delimeter;
158       outstream << "Left Aileron Pos" + delimeter;
159       outstream << "Right Aileron Pos" + delimeter;
160       outstream << "Elevator Pos" + delimeter;
161       outstream << "Rudder Pos" + delimeter;
162       outstream << "Flap Pos";
163     }
164     if (SubSystems & ssRates) {
165       outstream << delimeter;
166       outstream << "P" + delimeter + "Q" + delimeter + "R" + delimeter;
167       outstream << "Pdot" + delimeter + "Qdot" + delimeter + "Rdot";
168     }
169     if (SubSystems & ssVelocities) {
170       outstream << delimeter;
171       outstream << "QBar" + delimeter;
172       outstream << "Vtotal" + delimeter;
173       outstream << "UBody" + delimeter + "VBody" + delimeter + "WBody" + delimeter;
174       outstream << "UAero" + delimeter + "VAero" + delimeter + "WAero" + delimeter;
175       outstream << "Vn" + delimeter + "Ve" + delimeter + "Vd";
176     }
177     if (SubSystems & ssForces) {
178       outstream << delimeter;
179       outstream << "Drag" + delimeter + "Side" + delimeter + "Lift" + delimeter;
180       outstream << "L/D" + delimeter;
181       outstream << "Xforce" + delimeter + "Yforce" + delimeter + "Zforce";
182     }
183     if (SubSystems & ssMoments) {
184       outstream << delimeter;
185       outstream << "L" + delimeter + "M" + delimeter + "N";
186     }
187     if (SubSystems & ssAtmosphere) {
188       outstream << delimeter;
189       outstream << "Rho" + delimeter;
190       outstream << "NWind" + delimeter + "EWind" + delimeter + "DWind";
191     }
192     if (SubSystems & ssMassProps) {
193       outstream << delimeter;
194       outstream << "Ixx" + delimeter;
195       outstream << "Ixy" + delimeter;
196       outstream << "Ixz" + delimeter;
197       outstream << "Iyx" + delimeter;
198       outstream << "Iyy" + delimeter;
199       outstream << "Iyz" + delimeter;
200       outstream << "Izx" + delimeter;
201       outstream << "Izy" + delimeter;
202       outstream << "Izz" + delimeter;
203       outstream << "Mass" + delimeter;
204       outstream << "Xcg" + delimeter + "Ycg" + delimeter + "Zcg";
205     }
206     if (SubSystems & ssPropagate) {
207       outstream << delimeter;
208       outstream << "Altitude" + delimeter;
209       outstream << "Phi" + delimeter + "Tht" + delimeter + "Psi" + delimeter;
210       outstream << "Alpha" + delimeter;
211       outstream << "Beta" + delimeter;
212       outstream << "Latitude (Deg)" + delimeter;
213       outstream << "Longitude (Deg)" + delimeter;
214       outstream << "Distance AGL" + delimeter;
215       outstream << "Runway Radius";
216     }
217     if (SubSystems & ssCoefficients) {
218       scratch = Aerodynamics->GetCoefficientStrings(delimeter);
219       if (scratch.length() != 0) outstream << delimeter << scratch;
220     }
221     if (SubSystems & ssFCS) {
222       scratch = FCS->GetComponentStrings(delimeter);
223       if (scratch.length() != 0) outstream << delimeter << scratch;
224     }
225     if (SubSystems & ssGroundReactions) {
226       outstream << delimeter;
227       outstream << GroundReactions->GetGroundReactionStrings(delimeter);
228     }
229     if (SubSystems & ssPropulsion && Propulsion->GetNumEngines() > 0) {
230       outstream << delimeter;
231       outstream << Propulsion->GetPropulsionStrings(delimeter);
232     }
233     if (OutputProperties.size() > 0) {
234       for (unsigned int i=0;i<OutputProperties.size();i++) {
235         outstream << delimeter << OutputProperties[i]->GetName();
236       }
237     }
238
239     outstream << endl;
240     dFirstPass = false;
241   }
242
243   outstream << State->Getsim_time();
244   if (SubSystems & ssSimulation) {
245   }
246   if (SubSystems & ssAerosurfaces) {
247     outstream << delimeter;
248     outstream << FCS->GetDaCmd() << delimeter;
249     outstream << FCS->GetDeCmd() << delimeter;
250     outstream << FCS->GetDrCmd() << delimeter;
251     outstream << FCS->GetDfCmd() << delimeter;
252     outstream << FCS->GetDaLPos() << delimeter;
253     outstream << FCS->GetDaRPos() << delimeter;
254     outstream << FCS->GetDePos() << delimeter;
255     outstream << FCS->GetDrPos() << delimeter;
256     outstream << FCS->GetDfPos();
257   }
258   if (SubSystems & ssRates) {
259     outstream << delimeter;
260     outstream << Propagate->GetPQR().Dump(delimeter) << delimeter;
261     outstream << Propagate->GetPQRdot().Dump(delimeter);
262   }
263   if (SubSystems & ssVelocities) {
264     outstream << delimeter;
265     outstream << Auxiliary->Getqbar() << delimeter;
266     outstream << setprecision(12) << Auxiliary->GetVt() << delimeter;
267     outstream << setprecision(12) << Propagate->GetUVW().Dump(delimeter) << delimeter;
268     outstream << Auxiliary->GetAeroUVW().Dump(delimeter) << delimeter;
269     outstream << Propagate->GetVel().Dump(delimeter);
270   }
271   if (SubSystems & ssForces) {
272     outstream << delimeter;
273     outstream << Aerodynamics->GetvFs() << delimeter;
274     outstream << Aerodynamics->GetLoD() << delimeter;
275     outstream << Aircraft->GetForces().Dump(delimeter);
276   }
277   if (SubSystems & ssMoments) {
278     outstream << delimeter;
279     outstream << Aircraft->GetMoments().Dump(delimeter);
280   }
281   if (SubSystems & ssAtmosphere) {
282     outstream << delimeter;
283     outstream << Atmosphere->GetDensity() << delimeter;
284     outstream << Atmosphere->GetWindNED().Dump(delimeter);
285   }
286   if (SubSystems & ssMassProps) {
287     outstream << delimeter;
288     outstream << MassBalance->GetJ() << delimeter;
289     outstream << MassBalance->GetMass() << delimeter;
290     outstream << MassBalance->GetXYZcg();
291   }
292   if (SubSystems & ssPropagate) {
293     outstream << delimeter;
294     outstream << Propagate->Geth() << delimeter;
295     outstream << Propagate->GetEuler().Dump(delimeter) << delimeter;
296     outstream << Auxiliary->Getalpha(inDegrees) << delimeter;
297     outstream << Auxiliary->Getbeta(inDegrees) << delimeter;
298     outstream << Propagate->GetLocation().GetLatitudeDeg() << delimeter;
299     outstream << Propagate->GetLocation().GetLongitudeDeg() << delimeter;
300     outstream << Propagate->GetDistanceAGL() << delimeter;
301     outstream << Propagate->GetRunwayRadius();
302   }
303   if (SubSystems & ssCoefficients) {
304     scratch = Aerodynamics->GetCoefficientValues(delimeter);
305     if (scratch.length() != 0) outstream << delimeter << scratch;
306   }
307   if (SubSystems & ssFCS) {
308     scratch = FCS->GetComponentValues(delimeter);
309     if (scratch.length() != 0) outstream << delimeter << scratch;
310   }
311   if (SubSystems & ssGroundReactions) {
312     outstream << delimeter;
313     outstream << GroundReactions->GetGroundReactionValues(delimeter);
314   }
315   if (SubSystems & ssPropulsion && Propulsion->GetNumEngines() > 0) {
316     outstream << delimeter;
317     outstream << Propulsion->GetPropulsionValues(delimeter);
318   }
319
320   for (unsigned int i=0;i<OutputProperties.size();i++) {
321     outstream << delimeter << OutputProperties[i]->getDoubleValue();
322   }
323
324   outstream << endl;
325   outstream.flush();
326 }
327
328 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
329
330 void FGOutput::SocketOutput(void)
331 {
332   string asciiData;
333
334   if (socket == NULL) return;
335   if (!socket->GetConnectStatus()) return;
336
337   socket->Clear();
338   if (sFirstPass) {
339     socket->Append("<LABELS>");
340     socket->Append("Time");
341     socket->Append("Altitude");
342     socket->Append("Phi");
343     socket->Append("Tht");
344     socket->Append("Psi");
345     socket->Append("Rho");
346     socket->Append("Vtotal");
347     socket->Append("UBody");
348     socket->Append("VBody");
349     socket->Append("WBody");
350     socket->Append("UAero");
351     socket->Append("VAero");
352     socket->Append("WAero");
353     socket->Append("Vn");
354     socket->Append("Ve");
355     socket->Append("Vd");
356     socket->Append("Udot");
357     socket->Append("Vdot");
358     socket->Append("Wdot");
359     socket->Append("P");
360     socket->Append("Q");
361     socket->Append("R");
362     socket->Append("PDot");
363     socket->Append("QDot");
364     socket->Append("RDot");
365     socket->Append("Fx");
366     socket->Append("Fy");
367     socket->Append("Fz");
368     socket->Append("Latitude (Deg)");
369     socket->Append("Longitude (Deg)");
370     socket->Append("QBar");
371     socket->Append("Alpha");
372     socket->Append("L");
373     socket->Append("M");
374     socket->Append("N");
375     socket->Append("Throttle Position");
376     socket->Append("Left Aileron Position");
377     socket->Append("Right Aileron Position");
378     socket->Append("Elevator Position");
379     socket->Append("Rudder Position");
380     sFirstPass = false;
381     socket->Send();
382   }
383
384   socket->Clear();
385   socket->Append(State->Getsim_time());
386   socket->Append(Propagate->Geth());
387   socket->Append(Propagate->GetEuler(ePhi));
388   socket->Append(Propagate->GetEuler(eTht));
389   socket->Append(Propagate->GetEuler(ePsi));
390   socket->Append(Atmosphere->GetDensity());
391   socket->Append(Auxiliary->GetVt());
392   socket->Append(Propagate->GetUVW(eU));
393   socket->Append(Propagate->GetUVW(eV));
394   socket->Append(Propagate->GetUVW(eW));
395   socket->Append(Auxiliary->GetAeroUVW(eU));
396   socket->Append(Auxiliary->GetAeroUVW(eV));
397   socket->Append(Auxiliary->GetAeroUVW(eW));
398   socket->Append(Propagate->GetVel(eNorth));
399   socket->Append(Propagate->GetVel(eEast));
400   socket->Append(Propagate->GetVel(eDown));
401   socket->Append(Propagate->GetUVWdot(eU));
402   socket->Append(Propagate->GetUVWdot(eV));
403   socket->Append(Propagate->GetUVWdot(eW));
404   socket->Append(Propagate->GetPQR(eP));
405   socket->Append(Propagate->GetPQR(eQ));
406   socket->Append(Propagate->GetPQR(eR));
407   socket->Append(Propagate->GetPQRdot(eP));
408   socket->Append(Propagate->GetPQRdot(eQ));
409   socket->Append(Propagate->GetPQRdot(eR));
410   socket->Append(Aircraft->GetForces(eX));
411   socket->Append(Aircraft->GetForces(eY));
412   socket->Append(Aircraft->GetForces(eZ));
413   socket->Append(Propagate->GetLocation().GetLatitudeDeg());
414   socket->Append(Propagate->GetLocation().GetLongitudeDeg());
415   socket->Append(Auxiliary->Getqbar());
416   socket->Append(Auxiliary->Getalpha(inDegrees));
417   socket->Append(Aircraft->GetMoments(eL));
418   socket->Append(Aircraft->GetMoments(eM));
419   socket->Append(Aircraft->GetMoments(eN));
420   socket->Append(FCS->GetThrottlePos(0));
421   socket->Append(FCS->GetDaLPos());
422   socket->Append(FCS->GetDaRPos());
423   socket->Append(FCS->GetDePos());
424   socket->Append(FCS->GetDrPos());
425   socket->Send();
426 }
427
428 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
429
430 void FGOutput::SocketStatusOutput(string out_str)
431 {
432   string asciiData;
433
434   if (socket == NULL) return;
435
436   socket->Clear();
437   asciiData = string("<STATUS>") + out_str;
438   socket->Append(asciiData.c_str());
439   socket->Send();
440 }
441
442 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
443
444 bool FGOutput::Load(FGConfigFile* AC_cfg)
445 {
446   string token="", parameter="", separator="";
447   string name="", fname="";
448   int OutRate = 0;
449   FGConfigFile* Output_cfg;
450   string property;
451   unsigned int port;
452
453 # ifndef macintosh
454     separator = "/";
455 # else
456     separator = ";";
457 # endif
458
459   name = AC_cfg->GetValue("NAME");
460   fname = AC_cfg->GetValue("FILE");
461   token = AC_cfg->GetValue("TYPE");
462   port = atoi(AC_cfg->GetValue("PORT").c_str());
463
464   Output->SetType(token);
465
466   if (token == "SOCKET") {
467     socket = new FGfdmSocket(name,port);
468   }
469
470   if (!fname.empty()) {
471     outputInFileName = FDMExec->GetAircraftPath() + separator
472                         + FDMExec->GetModelName() + separator + fname + ".xml";
473     Output_cfg = new FGConfigFile(outputInFileName);
474     if (!Output_cfg->IsOpen()) {
475       cerr << "Could not open file: " << outputInFileName << endl;
476       return false;
477     }
478   } else {
479     Output_cfg = AC_cfg;
480   }
481   Output->SetFilename(name);
482
483   while ((token = Output_cfg->GetValue()) != string("/OUTPUT")) {
484     *Output_cfg >> parameter;
485     if (parameter == "RATE_IN_HZ") {
486       *Output_cfg >> OutRate;
487     }
488     if (parameter == "SIMULATION") {
489       *Output_cfg >> parameter;
490       if (parameter == "ON") SubSystems += ssSimulation;
491     }
492     if (parameter == "AEROSURFACES") {
493       *Output_cfg >> parameter;
494       if (parameter == "ON") SubSystems += ssAerosurfaces;
495     }
496     if (parameter == "RATES") {
497       *Output_cfg >> parameter;
498       if (parameter == "ON") SubSystems += ssRates;
499     }
500     if (parameter == "VELOCITIES") {
501       *Output_cfg >> parameter;
502       if (parameter == "ON") SubSystems += ssVelocities;
503     }
504     if (parameter == "FORCES") {
505       *Output_cfg >> parameter;
506       if (parameter == "ON") SubSystems += ssForces;
507     }
508     if (parameter == "MOMENTS") {
509       *Output_cfg >> parameter;
510       if (parameter == "ON") SubSystems += ssMoments;
511     }
512     if (parameter == "ATMOSPHERE") {
513       *Output_cfg >> parameter;
514       if (parameter == "ON") SubSystems += ssAtmosphere;
515     }
516     if (parameter == "MASSPROPS") {
517       *Output_cfg >> parameter;
518       if (parameter == "ON") SubSystems += ssMassProps;
519     }
520     if (parameter == "POSITION") {
521       *Output_cfg >> parameter;
522       if (parameter == "ON") SubSystems += ssPropagate;
523     }
524     if (parameter == "COEFFICIENTS") {
525       *Output_cfg >> parameter;
526       if (parameter == "ON") SubSystems += ssCoefficients;
527     }
528     if (parameter == "GROUND_REACTIONS") {
529       *Output_cfg >> parameter;
530       if (parameter == "ON") SubSystems += ssGroundReactions;
531     }
532     if (parameter == "FCS") {
533       *Output_cfg >> parameter;
534       if (parameter == "ON") SubSystems += ssFCS;
535     }
536     if (parameter == "PROPULSION") {
537       *Output_cfg >> parameter;
538       if (parameter == "ON") SubSystems += ssPropulsion;
539     }
540     if (parameter == "PROPERTY") {
541       *Output_cfg >> property;
542       OutputProperties.push_back(PropertyManager->GetNode(property));
543     }
544
545     if (parameter == "EOF") break;
546   }
547
548   OutRate = OutRate>120?120:(OutRate<0?0:OutRate);
549   rate = (int)(0.5 + 1.0/(State->Getdt()*OutRate));
550
551   Debug(2);
552
553   return true;
554 }
555
556 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
557 //    The bitmasked value choices are as follows:
558 //    unset: In this case (the default) JSBSim would only print
559 //       out the normally expected messages, essentially echoing
560 //       the config files as they are read. If the environment
561 //       variable is not set, debug_lvl is set to 1 internally
562 //    0: This requests JSBSim not to output any messages
563 //       whatsoever.
564 //    1: This value explicity requests the normal JSBSim
565 //       startup messages
566 //    2: This value asks for a message to be printed out when
567 //       a class is instantiated
568 //    4: When this value is set, a message is displayed when a
569 //       FGModel object executes its Run() method
570 //    8: When this value is set, various runtime state variables
571 //       are printed out periodically
572 //    16: When set various parameters are sanity checked and
573 //       a message is printed out when they go out of bounds
574
575 void FGOutput::Debug(int from)
576 {
577   string scratch="";
578
579   if (debug_lvl <= 0) return;
580
581   if (debug_lvl & 1) { // Standard console startup message output
582     if (from == 0) { // Constructor
583
584     }
585     if (from == 2) {
586       if (outputInFileName.empty())
587         cout << "  " << "Output parameters read inline" << endl;
588       else
589         cout << "    Output parameters read from file: " << outputInFileName << endl;
590
591       if (Filename == "cout" || Filename == "COUT") {
592         scratch = "    Log output goes to screen console";
593       } else if (!Filename.empty()) {
594         scratch = "    Log output goes to file: " + Filename;
595       }
596       switch (Type) {
597       case otCSV:
598         cout << scratch << " in CSV format output at rate " << 120/rate << " Hz" << endl;
599         break;
600       case otNone:
601         cout << "  No log output" << endl;
602         break;
603       }
604
605       if (SubSystems & ssSimulation)      cout << "    Simulation parameters logged" << endl;
606       if (SubSystems & ssAerosurfaces)    cout << "    Aerosurface parameters logged" << endl;
607       if (SubSystems & ssRates)           cout << "    Rate parameters logged" << endl;
608       if (SubSystems & ssVelocities)      cout << "    Velocity parameters logged" << endl;
609       if (SubSystems & ssForces)          cout << "    Force parameters logged" << endl;
610       if (SubSystems & ssMoments)         cout << "    Moments parameters logged" << endl;
611       if (SubSystems & ssAtmosphere)      cout << "    Atmosphere parameters logged" << endl;
612       if (SubSystems & ssMassProps)       cout << "    Mass parameters logged" << endl;
613       if (SubSystems & ssCoefficients)    cout << "    Coefficient parameters logged" << endl;
614       if (SubSystems & ssPropagate)       cout << "    Propagate parameters logged" << endl;
615       if (SubSystems & ssGroundReactions) cout << "    Ground parameters logged" << endl;
616       if (SubSystems & ssFCS)             cout << "    FCS parameters logged" << endl;
617       if (SubSystems & ssPropulsion)      cout << "    Propulsion parameters logged" << endl;
618       if (OutputProperties.size() > 0)    cout << "    Properties logged:" << endl;
619       for (unsigned int i=0;i<OutputProperties.size();i++) {
620         cout << "      - " << OutputProperties[i]->GetName() << endl;
621       }
622     }
623   }
624   if (debug_lvl & 2 ) { // Instantiation/Destruction notification
625     if (from == 0) cout << "Instantiated: FGOutput" << endl;
626     if (from == 1) cout << "Destroyed:    FGOutput" << endl;
627   }
628   if (debug_lvl & 4 ) { // Run() method entry print for FGModel-derived objects
629   }
630   if (debug_lvl & 8 ) { // Runtime state variables
631   }
632   if (debug_lvl & 16) { // Sanity checking
633   }
634   if (debug_lvl & 64) {
635     if (from == 0) { // Constructor
636       cout << IdSrc << endl;
637       cout << IdHdr << endl;
638     }
639   }
640 }
641 }