]> git.mxchange.org Git - flightgear.git/blob - src/FDM/JSBSim/FGOutput.cpp
Fix an issue where math.h doesn't define sqrt in namespace std (at least on MSVC...
[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 "FGTranslation.h"
51 #include "FGRotation.h"
52 #include "FGPosition.h"
53 #include "FGAuxiliary.h"
54 #include "FGInertial.h"
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
76   Debug(0);
77 }
78
79 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
80
81 FGOutput::~FGOutput()
82 {
83   if (socket) delete socket;
84   for (unsigned int i=0; i<OutputProperties.size(); i++) delete OutputProperties[i];
85
86   Debug(1);
87 }
88
89 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
90
91 bool FGOutput::Run(void)
92 {
93   if (enabled) {
94     if (!FGModel::Run()) {
95
96       if (Type == otSocket) {
97         SocketOutput();
98       } else if (Type == otCSV) {
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     return false;
108     } else {
109     return true;
110     }
111   }
112   return false;
113 }
114
115 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
116
117 void FGOutput::SetType(string type)
118 {
119   if (type == "CSV") {
120     Type = otCSV;
121   } else if (type == "TABULAR") {
122     Type = otTab;
123   } else if (type == "SOCKET") {
124     Type = otSocket;
125   } else if (type == "TERMINAL") {
126     Type = otTerminal;
127   } else if (type != string("NONE")) {
128     Type = otUnknown;
129     cerr << "Unknown type of output specified in config file" << endl;
130   }
131 }
132
133 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
134
135 void FGOutput::DelimitedOutput(string fname)
136 {
137   streambuf* buffer;
138   string scratch = "";
139
140   if (fname == "COUT" || fname == "cout") {
141     buffer = cout.rdbuf();
142   } else {
143     datafile.open(fname.c_str());
144     buffer = datafile.rdbuf();
145   }
146
147   ostream outstream(buffer);
148
149   if (dFirstPass) {
150     outstream << "Time";
151     if (SubSystems & ssSimulation) {
152       // Nothing here, yet
153     }
154     if (SubSystems & ssAerosurfaces) {
155       outstream << ", ";
156       outstream << "Aileron Cmd, ";
157       outstream << "Elevator Cmd, ";
158       outstream << "Rudder Cmd, ";
159       outstream << "Flap Cmd, ";
160       outstream << "Left Aileron Pos, ";
161       outstream << "Right Aileron Pos, ";
162       outstream << "Elevator Pos, ";
163       outstream << "Rudder Pos, ";
164       outstream << "Flap Pos";
165     }
166     if (SubSystems & ssRates) {
167       outstream << ", ";
168       outstream << "P, Q, R, ";
169       outstream << "Pdot, Qdot, Rdot";
170     }
171     if (SubSystems & ssVelocities) {
172       outstream << ", ";
173       outstream << "QBar, ";
174       outstream << "Vtotal, ";
175       outstream << "UBody, VBody, WBody, ";
176       outstream << "UAero, VAero, WAero, ";
177       outstream << "Vn, Ve, Vd";
178     }
179     if (SubSystems & ssForces) {
180       outstream << ", ";
181       outstream << "Drag, Side, Lift, ";
182       outstream << "L/D, ";
183       outstream << "Xforce, Yforce, Zforce, ";
184       outstream << "xGravity, yGravity, zGravity, ";
185       outstream << "xCoriolis, yCoriolis, zCoriolis, ";
186       outstream << "xCentrifugal, yCentrifugal, zCentrifugal";
187     }
188     if (SubSystems & ssMoments) {
189       outstream << ", ";
190       outstream << "L, M, N";
191     }
192     if (SubSystems & ssAtmosphere) {
193       outstream << ", ";
194       outstream << "Rho, ";
195       outstream << "NWind, EWind, DWind";
196     }
197     if (SubSystems & ssMassProps) {
198       outstream << ", ";
199       outstream << "Ixx, ";
200       outstream << "Ixy, ";
201       outstream << "Ixz, ";
202       outstream << "Iyx, ";
203       outstream << "Iyy, ";
204       outstream << "Iyz, ";
205       outstream << "Izx, ";
206       outstream << "Izy, ";
207       outstream << "Izz, ";
208       outstream << "Mass, ";
209       outstream << "Xcg, Ycg, Zcg";
210     }
211     if (SubSystems & ssPosition) {
212       outstream << ", ";
213       outstream << "Altitude, ";
214       outstream << "Phi, Tht, Psi, ";
215       outstream << "Alpha, ";
216       outstream << "Beta, ";
217       outstream << "Latitude, ";
218       outstream << "Longitude, ";
219       outstream << "Distance AGL, ";
220       outstream << "Runway Radius";
221     }
222     if (SubSystems & ssCoefficients) {
223       scratch = Aerodynamics->GetCoefficientStrings();
224       if (scratch.length() != 0) outstream << ", " << scratch;
225     }
226     if (SubSystems & ssFCS) {
227       scratch = FCS->GetComponentStrings();
228       if (scratch.length() != 0) outstream << ", " << scratch;
229     }
230     if (SubSystems & ssGroundReactions) {
231       outstream << ", ";
232       outstream << GroundReactions->GetGroundReactionStrings();
233     }
234     if (SubSystems & ssPropulsion && Propulsion->GetNumEngines() > 0) {
235       outstream << ", ";
236       outstream << Propulsion->GetPropulsionStrings();
237     }
238     if (OutputProperties.size() > 0) {
239       for (unsigned int i=0;i<OutputProperties.size();i++) {
240         outstream << ", " << OutputProperties[i]->GetName();
241       }
242     }
243
244     outstream << endl;
245     dFirstPass = false;
246   }
247
248   outstream << State->Getsim_time();
249   if (SubSystems & ssSimulation) {
250   }
251   if (SubSystems & ssAerosurfaces) {
252     outstream << ", ";
253     outstream << FCS->GetDaCmd() << ", ";
254     outstream << FCS->GetDeCmd() << ", ";
255     outstream << FCS->GetDrCmd() << ", ";
256     outstream << FCS->GetDfCmd() << ", ";
257     outstream << FCS->GetDaLPos() << ", ";
258     outstream << FCS->GetDaRPos() << ", ";
259     outstream << FCS->GetDePos() << ", ";
260     outstream << FCS->GetDrPos() << ", ";
261     outstream << FCS->GetDfPos();
262   }
263   if (SubSystems & ssRates) {
264     outstream << ", ";
265     outstream << Rotation->GetPQR() << ", ";
266     outstream << Rotation->GetPQRdot();
267   }
268   if (SubSystems & ssVelocities) {
269     outstream << ", ";
270     outstream << Translation->Getqbar() << ", ";
271     outstream << Translation->GetVt() << ", ";
272     outstream << Translation->GetUVW() << ", ";
273     outstream << Translation->GetAeroUVW() << ", ";
274     outstream << Position->GetVel();
275   }
276   if (SubSystems & ssForces) {
277     outstream << ", ";
278     outstream << Aerodynamics->GetvFs() << ", ";
279     outstream << Aerodynamics->GetLoD() << ", ";
280     outstream << Aircraft->GetForces() << ", ";
281     outstream << Inertial->GetGravity() << ", ";
282     outstream << Inertial->GetCoriolis() << ", ";
283     outstream << Inertial->GetCentrifugal();
284   }
285   if (SubSystems & ssMoments) {
286     outstream << ", ";
287     outstream << Aircraft->GetMoments();
288   }
289   if (SubSystems & ssAtmosphere) {
290     outstream << ", ";
291     outstream << Atmosphere->GetDensity() << ", ";
292     outstream << Atmosphere->GetWindNED();
293   }
294   if (SubSystems & ssMassProps) {
295     outstream << ", ";
296     outstream << MassBalance->GetJ() << ", ";
297     outstream << MassBalance->GetMass() << ", ";
298     outstream << MassBalance->GetXYZcg();
299   }
300   if (SubSystems & ssPosition) {
301     outstream << ", ";
302     outstream << Position->Geth() << ", ";
303     outstream << Rotation->GetEuler() << ", ";
304     outstream << Translation->Getalpha() << ", ";
305     outstream << Translation->Getbeta() << ", ";
306     outstream << Position->GetLatitude() << ", ";
307     outstream << Position->GetLongitude() << ", ";
308     outstream << Position->GetDistanceAGL() << ", ";
309     outstream << Position->GetRunwayRadius();
310   }
311   if (SubSystems & ssCoefficients) {
312     scratch = Aerodynamics->GetCoefficientValues();
313     if (scratch.length() != 0) outstream << ", " << scratch;
314   }
315   if (SubSystems & ssFCS) {
316     scratch = FCS->GetComponentValues();
317     if (scratch.length() != 0) outstream << ", " << scratch;
318   }
319   if (SubSystems & ssGroundReactions) {
320     outstream << ", ";
321     outstream << GroundReactions->GetGroundReactionValues();
322   }
323   if (SubSystems & ssPropulsion && Propulsion->GetNumEngines() > 0) {
324     outstream << ", ";
325     outstream << Propulsion->GetPropulsionValues();
326   }
327
328   for (unsigned int i=0;i<OutputProperties.size();i++) {
329     outstream << ", " << OutputProperties[i]->getDoubleValue();
330   }
331
332   outstream << endl;
333   outstream.flush();
334 }
335
336 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
337
338 void FGOutput::SocketOutput(void)
339 {
340   string asciiData;
341
342   if (socket == NULL) return;
343   if (!socket->GetConnectStatus()) return;
344
345   socket->Clear();
346   if (sFirstPass) {
347     socket->Append("<LABELS>");
348     socket->Append("Time");
349     socket->Append("Altitude");
350     socket->Append("Phi");
351     socket->Append("Tht");
352     socket->Append("Psi");
353     socket->Append("Rho");
354     socket->Append("Vtotal");
355     socket->Append("UBody");
356     socket->Append("VBody");
357     socket->Append("WBody");
358     socket->Append("UAero");
359     socket->Append("VAero");
360     socket->Append("WAero");
361     socket->Append("Vn");
362     socket->Append("Ve");
363     socket->Append("Vd");
364     socket->Append("Udot");
365     socket->Append("Vdot");
366     socket->Append("Wdot");
367     socket->Append("P");
368     socket->Append("Q");
369     socket->Append("R");
370     socket->Append("PDot");
371     socket->Append("QDot");
372     socket->Append("RDot");
373     socket->Append("Fx");
374     socket->Append("Fy");
375     socket->Append("Fz");
376     socket->Append("Latitude");
377     socket->Append("Longitude");
378     socket->Append("QBar");
379     socket->Append("Alpha");
380     socket->Append("L");
381     socket->Append("M");
382     socket->Append("N");
383     socket->Append("Throttle Position");
384     socket->Append("Left Aileron Position");
385     socket->Append("Right Aileron Position");
386     socket->Append("Elevator Position");
387     socket->Append("Rudder Position");
388     sFirstPass = false;
389     socket->Send();
390   }
391
392   socket->Clear();
393   socket->Append(State->Getsim_time());
394   socket->Append(Position->Geth());
395   socket->Append(Rotation->Getphi());
396   socket->Append(Rotation->Gettht());
397   socket->Append(Rotation->Getpsi());
398   socket->Append(Atmosphere->GetDensity());
399   socket->Append(Translation->GetVt());
400   socket->Append(Translation->GetUVW(eU));
401   socket->Append(Translation->GetUVW(eV));
402   socket->Append(Translation->GetUVW(eW));
403   socket->Append(Translation->GetAeroUVW(eU));
404   socket->Append(Translation->GetAeroUVW(eV));
405   socket->Append(Translation->GetAeroUVW(eW));
406   socket->Append(Position->GetVn());
407   socket->Append(Position->GetVe());
408   socket->Append(Position->GetVd());
409   socket->Append(Translation->GetUVWdot(eU));
410   socket->Append(Translation->GetUVWdot(eV));
411   socket->Append(Translation->GetUVWdot(eW));
412   socket->Append(Rotation->GetPQR(eP));
413   socket->Append(Rotation->GetPQR(eQ));
414   socket->Append(Rotation->GetPQR(eR));
415   socket->Append(Rotation->GetPQRdot(eP));
416   socket->Append(Rotation->GetPQRdot(eQ));
417   socket->Append(Rotation->GetPQRdot(eR));
418   socket->Append(Aircraft->GetForces(eX));
419   socket->Append(Aircraft->GetForces(eY));
420   socket->Append(Aircraft->GetForces(eZ));
421   socket->Append(Position->GetLatitude());
422   socket->Append(Position->GetLongitude());
423   socket->Append(Translation->Getqbar());
424   socket->Append(Translation->Getalpha());
425   socket->Append(Aircraft->GetMoments(eL));
426   socket->Append(Aircraft->GetMoments(eM));
427   socket->Append(Aircraft->GetMoments(eN));
428   socket->Append(FCS->GetThrottlePos(0));
429   socket->Append(FCS->GetDaLPos());
430   socket->Append(FCS->GetDaRPos());
431   socket->Append(FCS->GetDePos());
432   socket->Append(FCS->GetDrPos());
433   socket->Send();
434 }
435
436 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
437
438 void FGOutput::SocketStatusOutput(string out_str)
439 {
440   string asciiData;
441
442   if (socket == NULL) return;
443
444   socket->Clear();
445   asciiData = string("<STATUS>") + out_str;
446   socket->Append(asciiData.c_str());
447   socket->Send();
448 }
449
450 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
451
452 bool FGOutput::Load(FGConfigFile* AC_cfg)
453 {
454   string token="", parameter="", separator="";
455   string name="", fname="";
456   int OutRate = 0;
457   FGConfigFile* Output_cfg;
458   string property;
459
460 # ifndef macintosh
461     separator = "/";
462 # else
463     separator = ";";
464 # endif
465
466   name = AC_cfg->GetValue("NAME");
467   fname = AC_cfg->GetValue("FILE");
468   token = AC_cfg->GetValue("TYPE");
469   Output->SetType(token);
470
471 #if defined( FG_WITH_JSBSIM_SOCKET ) || !defined( FGFS )
472   if (token == "SOCKET") {
473     socket = new FGfdmSocket("localhost",1138);
474   }
475 #endif
476
477   if (!fname.empty()) {
478     outputInFileName = FDMExec->GetAircraftPath() + separator
479                         + FDMExec->GetModelName() + separator + fname + ".xml";
480     Output_cfg = new FGConfigFile(outputInFileName);
481     if (!Output_cfg->IsOpen()) {
482       cerr << "Could not open file: " << outputInFileName << endl;
483       return false;
484     }
485   } else {
486     Output_cfg = AC_cfg;
487   }
488   Output->SetFilename(name);
489
490   while ((token = Output_cfg->GetValue()) != string("/OUTPUT")) {
491     *Output_cfg >> parameter;
492     if (parameter == "RATE_IN_HZ") {
493       *Output_cfg >> OutRate;
494     }
495     if (parameter == "SIMULATION") {
496       *Output_cfg >> parameter;
497       if (parameter == "ON") SubSystems += ssSimulation;
498     }
499     if (parameter == "AEROSURFACES") {
500       *Output_cfg >> parameter;
501       if (parameter == "ON") SubSystems += ssAerosurfaces;
502     }
503     if (parameter == "RATES") {
504       *Output_cfg >> parameter;
505       if (parameter == "ON") SubSystems += ssRates;
506     }
507     if (parameter == "VELOCITIES") {
508       *Output_cfg >> parameter;
509       if (parameter == "ON") SubSystems += ssVelocities;
510     }
511     if (parameter == "FORCES") {
512       *Output_cfg >> parameter;
513       if (parameter == "ON") SubSystems += ssForces;
514     }
515     if (parameter == "MOMENTS") {
516       *Output_cfg >> parameter;
517       if (parameter == "ON") SubSystems += ssMoments;
518     }
519     if (parameter == "ATMOSPHERE") {
520       *Output_cfg >> parameter;
521       if (parameter == "ON") SubSystems += ssAtmosphere;
522     }
523     if (parameter == "MASSPROPS") {
524       *Output_cfg >> parameter;
525       if (parameter == "ON") SubSystems += ssMassProps;
526     }
527     if (parameter == "POSITION") {
528       *Output_cfg >> parameter;
529       if (parameter == "ON") SubSystems += ssPosition;
530     }
531     if (parameter == "COEFFICIENTS") {
532       *Output_cfg >> parameter;
533       if (parameter == "ON") SubSystems += ssCoefficients;
534     }
535     if (parameter == "GROUND_REACTIONS") {
536       *Output_cfg >> parameter;
537       if (parameter == "ON") SubSystems += ssGroundReactions;
538     }
539     if (parameter == "FCS") {
540       *Output_cfg >> parameter;
541       if (parameter == "ON") SubSystems += ssFCS;
542     }
543     if (parameter == "PROPULSION") {
544       *Output_cfg >> parameter;
545       if (parameter == "ON") SubSystems += ssPropulsion;
546     }
547     if (parameter == "PROPERTY") {
548       *Output_cfg >> property;
549       OutputProperties.push_back(PropertyManager->GetNode(property));
550     }
551
552     if (parameter == "EOF") break;
553   }
554
555   OutRate = OutRate>120?120:(OutRate<0?0:OutRate);
556   rate = (int)(0.5 + 1.0/(State->Getdt()*OutRate));
557
558   Debug(2);
559
560   return true;
561 }
562
563 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
564 //    The bitmasked value choices are as follows:
565 //    unset: In this case (the default) JSBSim would only print
566 //       out the normally expected messages, essentially echoing
567 //       the config files as they are read. If the environment
568 //       variable is not set, debug_lvl is set to 1 internally
569 //    0: This requests JSBSim not to output any messages
570 //       whatsoever.
571 //    1: This value explicity requests the normal JSBSim
572 //       startup messages
573 //    2: This value asks for a message to be printed out when
574 //       a class is instantiated
575 //    4: When this value is set, a message is displayed when a
576 //       FGModel object executes its Run() method
577 //    8: When this value is set, various runtime state variables
578 //       are printed out periodically
579 //    16: When set various parameters are sanity checked and
580 //       a message is printed out when they go out of bounds
581
582 void FGOutput::Debug(int from)
583 {
584   string scratch="";
585
586   if (debug_lvl <= 0) return;
587
588   if (debug_lvl & 1) { // Standard console startup message output
589     if (from == 0) { // Constructor
590
591     }
592     if (from == 2) {
593       if (outputInFileName.empty())
594         cout << "  " << "Output parameters read inline" << endl;
595       else
596         cout << "    Output parameters read from file: " << outputInFileName << endl;
597
598       if (Filename == "cout" || Filename == "COUT") {
599         scratch = "    Log output goes to screen console";
600       } else if (!Filename.empty()) {
601         scratch = "    Log output goes to file: " + Filename;
602       }
603       switch (Type) {
604       case otCSV:
605         cout << scratch << " in CSV format output at rate " << 120/rate << " Hz" << endl;
606         break;
607       case otNone:
608         cout << "  No log output" << endl;
609         break;
610       }
611
612       if (SubSystems & ssSimulation)      cout << "    Simulation parameters logged" << endl;
613       if (SubSystems & ssAerosurfaces)    cout << "    Aerosurface parameters logged" << endl;
614       if (SubSystems & ssRates)           cout << "    Rate parameters logged" << endl;
615       if (SubSystems & ssVelocities)      cout << "    Velocity parameters logged" << endl;
616       if (SubSystems & ssForces)          cout << "    Force parameters logged" << endl;
617       if (SubSystems & ssMoments)         cout << "    Moments parameters logged" << endl;
618       if (SubSystems & ssAtmosphere)      cout << "    Atmosphere parameters logged" << endl;
619       if (SubSystems & ssMassProps)       cout << "    Mass parameters logged" << endl;
620       if (SubSystems & ssCoefficients)    cout << "    Coefficient parameters logged" << endl;
621       if (SubSystems & ssPosition)        cout << "    Position parameters logged" << endl;
622       if (SubSystems & ssGroundReactions) cout << "    Ground parameters logged" << endl;
623       if (SubSystems & ssFCS)             cout << "    FCS parameters logged" << endl;
624       if (SubSystems & ssPropulsion)      cout << "    Propulsion parameters logged" << endl;
625     }
626   }
627   if (debug_lvl & 2 ) { // Instantiation/Destruction notification
628     if (from == 0) cout << "Instantiated: FGOutput" << endl;
629     if (from == 1) cout << "Destroyed:    FGOutput" << endl;
630   }
631   if (debug_lvl & 4 ) { // Run() method entry print for FGModel-derived objects
632   }
633   if (debug_lvl & 8 ) { // Runtime state variables
634   }
635   if (debug_lvl & 16) { // Sanity checking
636   }
637   if (debug_lvl & 64) {
638     if (from == 0) { // Constructor
639       cout << IdSrc << endl;
640       cout << IdHdr << endl;
641     }
642   }
643 }
644 }