1 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6 Purpose: Schedules and runs the model routines.
8 ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
10 This program is free software; you can redistribute it and/or modify it under
11 the terms of the GNU General Public License as published by the Free Software
12 Foundation; either version 2 of the License, or (at your option) any later
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
20 You should have received a copy of the GNU General Public License along with
21 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
22 Place - Suite 330, Boston, MA 02111-1307, USA.
24 Further information about the GNU General Public License can also be found on
25 the world wide web at http://www.gnu.org.
27 FUNCTIONAL DESCRIPTION
28 --------------------------------------------------------------------------------
30 This class wraps up the simulation scheduling routines.
33 --------------------------------------------------------------------------------
36 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37 COMMENTS, REFERENCES, and NOTES
38 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
40 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
45 # include <simgear/compiler.h>
46 # include STL_IOSTREAM
47 # include STL_ITERATOR
49 # if defined(sgi) && !defined(__GNUC__) && (_COMPILER_VERSION < 740)
50 # include <iostream.h>
57 #include "FGFDMExec.h"
59 #include "FGAtmosphere.h"
61 #include "FGGroundCallback.h"
62 #include "FGPropulsion.h"
63 #include "FGMassBalance.h"
64 #include "FGGroundReactions.h"
65 #include "FGAerodynamics.h"
66 #include "FGInertial.h"
67 #include "FGAircraft.h"
68 #include "FGPropagate.h"
69 #include "FGAuxiliary.h"
71 #include "FGConfigFile.h"
72 #include "FGInitialCondition.h"
73 #include "FGPropertyManager.h"
77 static const char *IdSrc = "$Id$";
78 static const char *IdHdr = ID_FDMEXEC;
80 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
82 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
84 unsigned int FGFDMExec::FDMctr = 0;
85 FGPropertyManager* FGFDMExec::master=0;
87 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
89 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
91 void checkTied ( FGPropertyManager *node )
93 int N = node->nChildren();
96 for (int i=0; i<N; i++) {
97 if (node->getChild(i)->nChildren() ) {
98 checkTied( (FGPropertyManager*)node->getChild(i) );
99 } else if ( node->getChild(i)->isTied() ) {
100 name = ((FGPropertyManager*)node->getChild(i))->GetFullyQualifiedName();
101 cerr << name << " is tied" << endl;
106 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
109 FGFDMExec::FGFDMExec(FGPropertyManager* root)
136 // Multiple FDM's are stopped for now. We need to ensure that
137 // the "user" instance always gets the zeroeth instance number,
138 // because there may be instruments or scripts tied to properties
139 // in the jsbsim[0] node.
144 char* num = getenv("JSBSIM_DEBUG");
145 if (num) debug_lvl = atoi(num); // set debug level
146 } catch (...) { // if error set to 1
150 if (root == 0) master= new FGPropertyManager;
153 instance = master->GetNode("/fdm/jsbsim",IdFDM,true);
158 // this is here to catch errors in binding member functions
159 // to the property tree.
162 } catch ( string msg ) {
163 cout << "Caught error: " << msg << endl;
168 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
170 FGFDMExec::~FGFDMExec()
174 checkTied( instance );
175 } catch ( string msg ) {
176 cout << "Caught error: " << msg << endl;
179 for (unsigned int i=1; i<SlaveFDMList.size(); i++) delete SlaveFDMList[i]->exec;
180 SlaveFDMList.clear();
185 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
187 bool FGFDMExec::Allocate(void)
191 Atmosphere = new FGAtmosphere(this);
192 FCS = new FGFCS(this);
193 Propulsion = new FGPropulsion(this);
194 MassBalance = new FGMassBalance(this);
195 Aerodynamics = new FGAerodynamics (this);
196 Inertial = new FGInertial(this);
197 GroundReactions = new FGGroundReactions(this);
198 Aircraft = new FGAircraft(this);
199 GroundCallback = new FGGroundCallback();
200 Propagate = new FGPropagate(this);
201 Auxiliary = new FGAuxiliary(this);
202 Output = new FGOutput(this);
204 State = new FGState(this); // This must be done here, as the FGState
205 // class needs valid pointers to the above
208 // Initialize models so they can communicate with each other
210 if (!Atmosphere->InitModel()) {
211 cerr << fgred << "Atmosphere model init failed" << fgdef << endl;
213 if (!FCS->InitModel()) {
214 cerr << fgred << "FCS model init failed" << fgdef << endl;
216 if (!Propulsion->InitModel()) {
217 cerr << fgred << "FGPropulsion model init failed" << fgdef << endl;
219 if (!MassBalance->InitModel()) {
220 cerr << fgred << "FGMassBalance model init failed" << fgdef << endl;
222 if (!Aerodynamics->InitModel()) {
223 cerr << fgred << "FGAerodynamics model init failed" << fgdef << endl;
225 if (!Inertial->InitModel()) {
226 cerr << fgred << "FGInertial model init failed" << fgdef << endl;
228 if (!GroundReactions->InitModel()) {
229 cerr << fgred << "Ground Reactions model init failed" << fgdef << endl;
231 if (!Aircraft->InitModel()) {
232 cerr << fgred << "Aircraft model init failed" << fgdef << endl;
234 if (!Propagate->InitModel()) {
235 cerr << fgred << "Propagate model init failed" << fgdef << endl;
237 if (!Auxiliary->InitModel()) {
238 cerr << fgred << "Auxiliary model init failed" << fgdef << endl;
240 if (!Output->InitModel()) {
241 cerr << fgred << "Output model init failed" << fgdef << endl;
244 if (Error > 0) result = false;
246 IC = new FGInitialCondition(this);
248 // Schedule a model. The second arg (the integer) is the pass number. For
249 // instance, the atmosphere model gets executed every fifth pass it is called
250 // by the executive. Everything else here gets executed each pass.
251 // IC and Trim objects are NOT scheduled.
253 Schedule(Atmosphere, 1);
255 Schedule(Propulsion, 1);
256 Schedule(MassBalance, 1);
257 Schedule(Aerodynamics, 1);
258 Schedule(Inertial, 1);
259 Schedule(GroundReactions, 1);
260 Schedule(Aircraft, 1);
261 Schedule(Propagate, 1);
262 Schedule(Auxiliary, 1);
270 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
272 bool FGFDMExec::DeAllocate(void)
280 delete GroundReactions;
290 delete GroundCallback;
312 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
314 int FGFDMExec::Schedule(FGModel* model, int rate)
316 FGModel* model_iterator;
318 model_iterator = FirstModel;
320 if (model_iterator == 0L) { // this is the first model
323 FirstModel->NextModel = 0L;
324 FirstModel->SetRate(rate);
326 } else { // subsequent model
328 while (model_iterator->NextModel != 0L) {
329 model_iterator = model_iterator->NextModel;
331 model_iterator->NextModel = model;
332 model_iterator->NextModel->SetRate(rate);
339 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
341 bool FGFDMExec::Run(void)
343 FGModel* model_iterator;
345 if (frozen) return true;
347 model_iterator = FirstModel;
348 if (model_iterator == 0L) return false;
352 for (unsigned int i=1; i<SlaveFDMList.size(); i++) {
353 // SlaveFDMList[i]->exec->State->Initialize(); // Transfer state to the slave FDM
354 // SlaveFDMList[i]->exec->Run();
357 while (model_iterator != 0L) {
358 model_iterator->Run();
359 model_iterator = model_iterator->NextModel;
367 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
369 bool FGFDMExec::RunIC(void)
372 State->Initialize(IC);
379 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
381 void FGFDMExec::SetGroundCallback(FGGroundCallback* p) {
383 delete GroundCallback;
387 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
389 vector <string> FGFDMExec::EnumerateFDMs(void)
391 vector <string> FDMList;
393 FDMList.push_back(Aircraft->GetAircraftName());
395 for (unsigned int i=1; i<SlaveFDMList.size(); i++) {
396 FDMList.push_back(SlaveFDMList[i]->exec->GetAircraft()->GetAircraftName());
402 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
404 bool FGFDMExec::LoadModel(string AircraftPath, string EnginePath, string model,
408 FGFDMExec::AircraftPath = AircraftPath;
409 FGFDMExec::EnginePath = EnginePath;
411 return LoadModel(model, addModelToPath);
414 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
417 bool FGFDMExec::LoadModel(string model, bool addModelToPath)
422 string aircraftCfgFileName;
424 if( AircraftPath.empty() || EnginePath.empty() ) {
425 cerr << "Error: attempted to load aircraft with undefined ";
426 cerr << "aircraft and engine paths" << endl;
430 aircraftCfgFileName = AircraftPath;
432 if (addModelToPath) aircraftCfgFileName += "/" + model;
433 aircraftCfgFileName += "/" + model + ".xml";
435 if (addModelToPath) aircraftCfgFileName += ";" + model;
436 aircraftCfgFileName += ";" + model + ".xml";
439 FGConfigFile AC_cfg(aircraftCfgFileName);
440 if (!AC_cfg.IsOpen()) return false;
449 if (!ReadPrologue(&AC_cfg)) return false;
451 while ((AC_cfg.GetNextConfigLine() != string("EOF")) &&
452 (token = AC_cfg.GetValue()) != string("/FDM_CONFIG")) {
453 if (token == "METRICS") {
454 if (debug_lvl > 0) cout << fgcyan << "\n Reading Metrics" << fgdef << endl;
455 if (!ReadMetrics(&AC_cfg)) result = false;
456 } else if (token == "SLAVE") {
457 if (debug_lvl > 0) cout << fgcyan << "\n Reading Slave flight vehicle: " << fgdef
458 << AC_cfg.GetValue("NAME") << endl;
459 if (!ReadSlave(&AC_cfg)) result = false;
460 } else if (token == "AERODYNAMICS") {
461 if (debug_lvl > 0) cout << fgcyan << "\n Reading Aerodynamics" << fgdef << endl;
462 if (!ReadAerodynamics(&AC_cfg)) result = false;
463 } else if (token == "UNDERCARRIAGE") {
464 if (debug_lvl > 0) cout << fgcyan << "\n Reading Landing Gear" << fgdef << endl;
465 if (!ReadUndercarriage(&AC_cfg)) result = false;
466 } else if (token == "PROPULSION") {
467 if (debug_lvl > 0) cout << fgcyan << "\n Reading Propulsion" << fgdef << endl;
468 if (!ReadPropulsion(&AC_cfg)) result = false;
469 } else if (token == "FLIGHT_CONTROL") {
470 if (debug_lvl > 0) cout << fgcyan << "\n Reading Flight Control" << fgdef << endl;
471 if (!ReadFlightControls(&AC_cfg)) result = false;
472 } else if (token == "AUTOPILOT") {
473 if (debug_lvl > 0) cout << fgcyan << "\n Reading Autopilot" << fgdef << endl;
474 if (!ReadFlightControls(&AC_cfg)) result = false;
475 } else if (token == "OUTPUT") {
476 if (debug_lvl > 0) cout << fgcyan << "\n Reading Output directives" << fgdef << endl;
477 if (!ReadOutput(&AC_cfg)) result = false;
486 << " FGFDMExec: Failed to load aircraft and/or engine model"
493 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
495 bool FGFDMExec::ReadPrologue(FGConfigFile* AC_cfg)
497 string token = AC_cfg->GetValue();
501 AircraftName = AC_cfg->GetValue("NAME");
502 Aircraft->SetAircraftName(AircraftName);
504 if (debug_lvl > 0) cout << underon << "Reading Aircraft Configuration File"
505 << underoff << ": " << highint << AircraftName << normint << endl;
506 scratch = AC_cfg->GetValue("VERSION").c_str();
508 CFGVersion = AC_cfg->GetValue("VERSION");
509 Release = AC_cfg->GetValue("RELEASE");
512 cout << " Version: " << highint << CFGVersion
514 if (CFGVersion != needed_cfg_version) {
515 cerr << endl << fgred << "YOU HAVE AN INCOMPATIBLE CFG FILE FOR THIS AIRCRAFT."
516 " RESULTS WILL BE UNPREDICTABLE !!" << endl;
517 cerr << "Current version needed is: " << needed_cfg_version << endl;
518 cerr << " You have version: " << CFGVersion << endl << fgdef << endl;
522 if (Release == "ALPHA" && debug_lvl > 0) {
524 system("banner ALPHA");
527 << highint << "This aircraft model is an " << fgred << Release
528 << reset << highint << " release!!!" << endl << endl << reset
529 << "This aircraft model may not even properly load, and probably"
530 << " will not fly as expected." << endl << endl
531 << fgred << highint << "Use this model for development purposes ONLY!!!"
532 << normint << reset << endl << endl;
533 } else if (Release == "BETA" && debug_lvl > 0) {
535 system("banner BETA");
538 << highint << "This aircraft model is a " << fgred << Release
539 << reset << highint << " release!!!" << endl << endl << reset
540 << "This aircraft model probably will not fly as expected." << endl << endl
541 << fgblue << highint << "Use this model for development purposes ONLY!!!"
542 << normint << reset << endl << endl;
548 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
550 bool FGFDMExec::ReadSlave(FGConfigFile* AC_cfg)
552 // Add a new slaveData object to the slave FDM list
553 // Populate that slaveData element with a new FDMExec object
554 // Set the IsSlave flag for that FDMExec object
555 // Get the aircraft name
556 // set debug level to print out no additional data for slave objects
557 // Load the model given the aircraft name
558 // reset debug level to prior setting
560 int saved_debug_lvl = debug_lvl;
563 SlaveFDMList.push_back(new slaveData);
564 SlaveFDMList.back()->exec = new FGFDMExec();
565 SlaveFDMList.back()->exec->SetSlave();
567 string AircraftName = AC_cfg->GetValue("FILE");
569 debug_lvl = 0; // turn off debug output for slave vehicle
571 SlaveFDMList.back()->exec->SetAircraftPath( AircraftPath );
572 SlaveFDMList.back()->exec->SetEnginePath( EnginePath );
573 SlaveFDMList.back()->exec->LoadModel(AircraftName);
574 debug_lvl = saved_debug_lvl; // turn debug output back on for master vehicle
576 AC_cfg->GetNextConfigLine();
577 while ((token = AC_cfg->GetValue()) != string("/SLAVE")) {
579 if (token == "XLOC") { *AC_cfg >> SlaveFDMList.back()->x; }
580 else if (token == "YLOC") { *AC_cfg >> SlaveFDMList.back()->y; }
581 else if (token == "ZLOC") { *AC_cfg >> SlaveFDMList.back()->z; }
582 else if (token == "PITCH") { *AC_cfg >> SlaveFDMList.back()->pitch;}
583 else if (token == "YAW") { *AC_cfg >> SlaveFDMList.back()->yaw; }
584 else if (token == "ROLL") { *AC_cfg >> SlaveFDMList.back()->roll; }
585 else cerr << "Unknown identifier: " << token << " in slave vehicle definition" << endl;
589 cout << " X = " << SlaveFDMList.back()->x << endl;
590 cout << " Y = " << SlaveFDMList.back()->y << endl;
591 cout << " Z = " << SlaveFDMList.back()->z << endl;
592 cout << " Pitch = " << SlaveFDMList.back()->pitch << endl;
593 cout << " Yaw = " << SlaveFDMList.back()->yaw << endl;
594 cout << " Roll = " << SlaveFDMList.back()->roll << endl;
600 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
602 bool FGFDMExec::ReadPropulsion(FGConfigFile* AC_cfg)
604 if (!Propulsion->Load(AC_cfg)) {
605 cerr << " Propulsion not successfully loaded" << endl;
611 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
613 bool FGFDMExec::ReadFlightControls(FGConfigFile* AC_cfg)
615 if (!FCS->Load(AC_cfg)) {
616 cerr << " Flight Controls not successfully loaded" << endl;
622 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
624 bool FGFDMExec::ReadAerodynamics(FGConfigFile* AC_cfg)
626 if (!Aerodynamics->Load(AC_cfg)) {
627 cerr << " Aerodynamics not successfully loaded" << endl;
633 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
635 bool FGFDMExec::ReadUndercarriage(FGConfigFile* AC_cfg)
637 if (!GroundReactions->Load(AC_cfg)) {
638 cerr << " Ground Reactions not successfully loaded" << endl;
644 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
646 bool FGFDMExec::ReadMetrics(FGConfigFile* AC_cfg)
648 if (!Aircraft->Load(AC_cfg)) {
649 cerr << " Aircraft metrics not successfully loaded" << endl;
655 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
657 bool FGFDMExec::ReadOutput(FGConfigFile* AC_cfg)
659 if (!Output->Load(AC_cfg)) {
660 cerr << " Output not successfully loaded" << endl;
666 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
668 FGPropertyManager* FGFDMExec::GetPropertyManager(void) {
672 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
674 FGTrim* FGFDMExec::GetTrim(void) {
676 Trim = new FGTrim(this,tNone);
680 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
681 // The bitmasked value choices are as follows:
682 // unset: In this case (the default) JSBSim would only print
683 // out the normally expected messages, essentially echoing
684 // the config files as they are read. If the environment
685 // variable is not set, debug_lvl is set to 1 internally
686 // 0: This requests JSBSim not to output any messages
688 // 1: This value explicity requests the normal JSBSim
690 // 2: This value asks for a message to be printed out when
691 // a class is instantiated
692 // 4: When this value is set, a message is displayed when a
693 // FGModel object executes its Run() method
694 // 8: When this value is set, various runtime state variables
695 // are printed out periodically
696 // 16: When set various parameters are sanity checked and
697 // a message is printed out when they go out of bounds
699 void FGFDMExec::Debug(int from)
701 if (debug_lvl <= 0) return;
703 if (debug_lvl & 1 && IdFDM == 0) { // Standard console startup message output
704 if (from == 0) { // Constructor
705 cout << "\n\n " << highint << underon << "JSBSim Flight Dynamics Model v"
706 << JSBSim_version << underoff << normint << endl;
707 cout << halfint << " [cfg file spec v" << needed_cfg_version << "]\n\n";
708 cout << normint << "JSBSim startup beginning ...\n\n";
709 } else if (from == 3) {
710 cout << "\n\nJSBSim startup complete\n\n";
713 if (debug_lvl & 2 ) { // Instantiation/Destruction notification
714 if (from == 0) cout << "Instantiated: FGFDMExec" << endl;
715 if (from == 1) cout << "Destroyed: FGFDMExec" << endl;
717 if (debug_lvl & 4 ) { // Run() method entry print for FGModel-derived objects
719 cout << "================== Frame: " << Frame << " Time: "
720 << State->Getsim_time() << endl;
723 if (debug_lvl & 8 ) { // Runtime state variables
725 if (debug_lvl & 16) { // Sanity checking
727 if (debug_lvl & 64) {
728 if (from == 0) { // Constructor
729 cout << IdSrc << endl;
730 cout << IdHdr << endl;