]> git.mxchange.org Git - flightgear.git/blob - src/FDM/JSBSim/FGFDMExec.h
Bertrand Coconnier: bug fix for #184, JSBSim: command line arguments
[flightgear.git] / src / FDM / JSBSim / FGFDMExec.h
1 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2  Header:       FGFDMExec.h
3  Author:       Jon Berndt
4  Date started: 11/17/98
5  file The header file for the JSBSim executive.
6
7  ------------- Copyright (C) 1999  Jon S. Berndt (jon@jsbsim.org) -------------
8
9  This program is free software; you can redistribute it and/or modify it under
10  the terms of the GNU Lesser General Public License as published by the Free Software
11  Foundation; either version 2 of the License, or (at your option) any later
12  version.
13
14  This program is distributed in the hope that it will be useful, but WITHOUT
15  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16  FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
17  details.
18
19  You should have received a copy of the GNU Lesser General Public License along with
20  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21  Place - Suite 330, Boston, MA  02111-1307, USA.
22
23  Further information about the GNU Lesser General Public License can also be found on
24  the world wide web at http://www.gnu.org.
25
26 HISTORY
27 --------------------------------------------------------------------------------
28 11/17/98   JSB   Created
29 7/31/99     TP   Added RunIC function that runs the sim so that every frame
30                  begins with the IC values from the given FGInitialCondition
31                  object and dt=0.
32
33 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
34 SENTRY
35 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
36
37 #ifndef FGFDMEXEC_HEADER_H
38 #define FGFDMEXEC_HEADER_H
39
40 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41 INCLUDES
42 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
43
44 #include <vector>
45 #include <string>
46
47 #include "models/FGOutput.h"
48 #include "models/FGInput.h"
49 #include "initialization/FGTrim.h"
50 #include "FGJSBBase.h"
51 #include "input_output/FGPropertyManager.h"
52 #include "input_output/FGGroundCallback.h"
53 #include "input_output/FGXMLFileRead.h"
54 #include "models/FGPropagate.h"
55 #include "math/FGColumnVector3.h"
56
57 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
58 DEFINITIONS
59 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
60
61 #define ID_FDMEXEC "$Id: FGFDMExec.h,v 1.63 2011/02/19 16:44:41 jberndt Exp $"
62
63 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
64 FORWARD DECLARATIONS
65 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
66
67 namespace JSBSim {
68
69 class FGScript;
70 class FGTrim;
71 class FGAerodynamics;
72 class FGAircraft;
73 class FGAtmosphere;
74 class FGAuxiliary;
75 class FGBuoyantForces;
76 class FGExternalReactions;
77 class FGGroundReactions;
78 class FGFCS;
79 class FGInertial;
80 class FGInput;
81 class FGOutput;
82 class FGPropagate;
83 class FGPropulsion;
84 class FGMassBalance;
85
86 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
87 CLASS DOCUMENTATION
88 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
89
90 /** Encapsulates the JSBSim simulation executive.
91     This class is the executive class through which all other simulation classes
92     are instantiated, initialized, and run. When integrated with FlightGear (or
93     other flight simulator) this class is typically instantiated by an interface
94     class on the simulator side.
95
96     At the time of simulation initialization, the interface
97     class creates an instance of this executive class. The
98     executive is subsequently directed to load the chosen aircraft specification
99     file:
100
101     @code
102     fdmex = new FGFDMExec( ... );
103     result = fdmex->LoadModel( ... );
104     @endcode
105
106     When an aircraft model is loaded, the config file is parsed and for each of the
107     sections of the config file (propulsion, flight control, etc.) the
108     corresponding Load() method is called (e.g. FGFCS::Load()).
109
110     Subsequent to the creation of the executive and loading of the model,
111     initialization is performed. Initialization involves copying control inputs
112     into the appropriate JSBSim data storage locations, configuring it for the set
113     of user supplied initial conditions, and then copying state variables from
114     JSBSim. The state variables are used to drive the instrument displays and to
115     place the vehicle model in world space for visual rendering:
116
117     @code
118     copy_to_JSBsim(); // copy control inputs to JSBSim
119     fdmex->RunIC(); // loop JSBSim once w/o integrating
120     copy_from_JSBsim(); // update the bus
121     @endcode
122
123     Once initialization is complete, cyclic execution proceeds:
124
125     @code
126     copy_to_JSBsim(); // copy control inputs to JSBSim
127     fdmex->Run(); // execute JSBSim
128     copy_from_JSBsim(); // update the bus
129     @endcode
130
131     JSBSim can be used in a standalone mode by creating a compact stub program
132     that effectively performs the same progression of steps as outlined above for
133     the integrated version, but with two exceptions. First, the copy_to_JSBSim()
134     and copy_from_JSBSim() functions are not used because the control inputs are
135     handled directly by the scripting facilities and outputs are handled by the
136     output (data logging) class. Second, the name of a script file can be supplied
137     to the stub program. Scripting (see FGScript) provides a way to supply command
138     inputs to the simulation:
139
140     @code
141     FDMExec = new JSBSim::FGFDMExec();
142     FDMExec->LoadScript( ScriptName ); // the script loads the aircraft and ICs
143     result = FDMExec->Run();
144     while (result) { // cyclic execution
145       result = FDMExec->Run(); // execute JSBSim
146     }
147     @endcode
148
149     The standalone mode has been useful for verifying changes before committing
150     updates to the source code repository. It is also useful for running sets of
151     tests that reveal some aspects of simulated aircraft performance, such as
152     range, time-to-climb, takeoff distance, etc.
153
154     <h3>JSBSim Debugging Directives</h3>
155
156     This describes to any interested entity the debug level
157     requested by setting the JSBSIM_DEBUG environment variable.
158     The bitmasked value choices are as follows:
159     - <b>unset</b>: In this case (the default) JSBSim would only print
160        out the normally expected messages, essentially echoing
161        the config files as they are read. If the environment
162        variable is not set, debug_lvl is set to 1 internally
163     - <b>0</b>: This requests JSBSim not to output any messages
164        whatsoever
165     - <b>1</b>: This value explicity requests the normal JSBSim
166        startup messages
167     - <b>2</b>: This value asks for a message to be printed out when
168        a class is instantiated
169     - <b>4</b>: When this value is set, a message is displayed when a
170        FGModel object executes its Run() method
171     - <b>8</b>: When this value is set, various runtime state variables
172        are printed out periodically
173     - <b>16</b>: When set various parameters are sanity checked and
174        a message is printed out when they go out of bounds
175
176     <h3>Properties</h3>
177     @property simulator/do_trim (write only) Can be set to the integer equivalent to one of
178                                 tLongitudinal (0), tFull (1), tGround (2), tPullup (3),
179                                 tCustom (4), tTurn (5). Setting this to a legal value
180                                 (such as by a script) causes a trim to be performed. This
181                                 property actually maps toa function call of DoTrim().
182
183     @author Jon S. Berndt
184     @version $Revision: 1.63 $
185 */
186
187 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
188 CLASS DECLARATION
189 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
190
191 class FGFDMExec : public FGJSBBase, public FGXMLFileRead
192 {
193   struct childData {
194     FGFDMExec* exec;
195     string info;
196     FGColumnVector3 Loc;
197     FGColumnVector3 Orient;
198     bool mated;
199     bool internal;
200
201     childData(void) {
202       info = "";
203       Loc = FGColumnVector3(0,0,0);
204       Orient = FGColumnVector3(0,0,0);
205       mated = true;
206       internal = false;
207     }
208     
209     void Run(void) {exec->Run();}
210     void AssignState(FGPropagate* source_prop) {
211       exec->GetPropagate()->SetVState(source_prop->GetVState());
212     }
213
214     ~childData(void) {
215       delete exec;
216     }
217   };
218
219 public:
220
221   /// Default constructor
222   FGFDMExec(FGPropertyManager* root = 0, unsigned int* fdmctr = 0);
223
224   /// Default destructor
225   ~FGFDMExec();
226
227   /** Unbind all tied JSBSim properties. */
228   void Unbind(void) {instance->Unbind();}
229
230   /** This routine places a model into the runlist at the specified rate. The
231       "rate" is not really a clock rate. It represents how many calls to the
232       FGFDMExec::Run() method must be made before the model is executed. A
233       value of 1 means that the model will be executed for each call to the
234       exec's Run() method. A value of 5 means that the model will only be
235       executed every 5th call to the exec's Run() method. Use of a rate other than
236       one is at this time not recommended.
237       @param model A pointer to the model being scheduled.
238       @param rate The rate at which to execute the model as described above.
239       @return Currently returns 0 always. */
240   void Schedule(FGModel* model, int rate);
241
242   /** This function executes each scheduled model in succession.
243       @return true if successful, false if sim should be ended  */
244   bool Run(void);
245
246   /** Initializes the sim from the initial condition object and executes
247       each scheduled model without integrating i.e. dt=0.
248       @return true if successful */
249   bool RunIC(void);
250
251   /** Sets the ground callback pointer.
252       @param gc A pointer to a ground callback object.  */
253   void SetGroundCallback(FGGroundCallback* gc);
254
255   /** Loads an aircraft model.
256       @param AircraftPath path to the aircraft/ directory. For instance:
257       "aircraft". Under aircraft, then, would be directories for various
258       modeled aircraft such as C172/, x15/, etc.
259       @param EnginePath path to the directory under which engine config
260       files are kept, for instance "engine"
261       @param SystemsPath path to the directory under which systems config
262       files are kept, for instance "systems"
263       @param model the name of the aircraft model itself. This file will
264       be looked for in the directory specified in the AircraftPath variable,
265       and in turn under the directory with the same name as the model. For
266       instance: "aircraft/x15/x15.xml"
267       @param addModelToPath set to true to add the model name to the
268       AircraftPath, defaults to true
269       @return true if successful */
270   bool LoadModel(const string& AircraftPath, const string& EnginePath, const string& SystemsPath,
271                  const string& model, bool addModelToPath = true);
272
273   /** Loads an aircraft model.  The paths to the aircraft and engine
274       config file directories must be set prior to calling this.  See
275       below.
276       @param model the name of the aircraft model itself. This file will
277       be looked for in the directory specified in the AircraftPath variable,
278       and in turn under the directory with the same name as the model. For
279       instance: "aircraft/x15/x15.xml"
280       @param addModelToPath set to true to add the model name to the
281       AircraftPath, defaults to true
282       @return true if successful*/
283   bool LoadModel(const string& model, bool addModelToPath = true);
284
285   /** Loads a script
286       @param Script the full path name and file name for the script to be loaded.
287       @param deltaT The simulation integration step size, if given.  If no value is supplied
288                     then 0.0 is used and the value is expected to be supplied in
289                     the script file itself.
290       @return true if successfully loadsd; false otherwise. */
291   bool LoadScript(const string& Script, double deltaT=0.0);
292
293   /** Sets the path to the engine config file directories.
294       @param path path to the directory under which engine config
295       files are kept, for instance "engine"  */
296   bool SetEnginePath(const string& path)   { EnginePath = RootDir + path; return true; }
297
298   /** Sets the path to the aircraft config file directories.
299       @param path path to the aircraft directory. For instance:
300       "aircraft". Under aircraft, then, would be directories for various
301       modeled aircraft such as C172/, x15/, etc.  */
302   bool SetAircraftPath(const string& path) { AircraftPath = RootDir + path; return true; }
303   
304   /** Sets the path to the systems config file directories.
305       @param path path to the directory under which systems config
306       files are kept, for instance "systems"  */
307   bool SetSystemsPath(const string& path)   { SystemsPath = RootDir + path; return true; }
308   
309   /// @name Top-level executive State and Model retrieval mechanism
310   //@{
311   /// Returns the FGAtmosphere pointer.
312   FGAtmosphere* GetAtmosphere(void)    {return Atmosphere;}
313   /// Returns the FGFCS pointer.
314   FGFCS* GetFCS(void)                  {return FCS;}
315   /// Returns the FGPropulsion pointer.
316   FGPropulsion* GetPropulsion(void)    {return Propulsion;}
317   /// Returns the FGAircraft pointer.
318   FGMassBalance* GetMassBalance(void)  {return MassBalance;}
319   /// Returns the FGAerodynamics pointer
320   FGAerodynamics* GetAerodynamics(void){return Aerodynamics;}
321   /// Returns the FGInertial pointer.
322   FGInertial* GetInertial(void)        {return Inertial;}
323   /// Returns the FGGroundReactions pointer.
324   FGGroundReactions* GetGroundReactions(void) {return GroundReactions;}
325   /// Returns the FGExternalReactions pointer.
326   FGExternalReactions* GetExternalReactions(void) {return ExternalReactions;}
327   /// Returns the FGBuoyantForces pointer.
328   FGBuoyantForces* GetBuoyantForces(void) {return BuoyantForces;}
329   /// Returns the FGAircraft pointer.
330   FGAircraft* GetAircraft(void)        {return Aircraft;}
331   /// Returns the FGPropagate pointer.
332   FGPropagate* GetPropagate(void)      {return Propagate;}
333   /// Returns the FGAuxiliary pointer.
334   FGAuxiliary* GetAuxiliary(void)      {return Auxiliary;}
335   /// Returns the FGInput pointer.
336   FGInput* GetInput(void)              {return Input;}
337   /// Returns the FGGroundCallback pointer.
338   FGGroundCallback* GetGroundCallback(void) {return GroundCallback;}
339   /// Retrieves the script object
340   FGScript* GetScript(void) {return Script;}
341   // Returns a pointer to the FGInitialCondition object
342   FGInitialCondition* GetIC(void)      {return IC;}
343   // Returns a pointer to the FGTrim object
344   FGTrim* GetTrim(void);
345   //@}
346
347   /// Retrieves the engine path.
348   const string& GetEnginePath(void)    {return EnginePath;}
349   /// Retrieves the aircraft path.
350   const string& GetAircraftPath(void)  {return AircraftPath;}
351   /// Retrieves the systems path.
352   const string& GetSystemsPath(void)   {return SystemsPath;}
353   /// Retrieves the full aircraft path name.
354   const string& GetFullAircraftPath(void) {return FullAircraftPath;}
355
356   /** Retrieves the value of a property.
357       @param property the name of the property
358       @result the value of the specified property */
359   inline double GetPropertyValue(const string& property) {return instance->GetDouble(property);}
360
361   /** Sets a property value.
362       @param property the property to be set
363       @param value the value to set the property to */
364   inline void SetPropertyValue(const string& property, double value) {
365     instance->SetDouble(property, value);
366   }
367
368   /// Returns the model name.
369   const string& GetModelName(void) { return modelName; }
370 /*
371   /// Returns the current time.
372   double GetSimTime(void);
373
374   /// Returns the current frame time (delta T).
375   double GetDeltaT(void);
376 */  
377   /// Returns a pointer to the property manager object.
378   FGPropertyManager* GetPropertyManager(void);
379   /// Returns a vector of strings representing the names of all loaded models (future)
380   vector <string> EnumerateFDMs(void);
381   /// Gets the number of child FDMs.
382   int GetFDMCount(void) {return (int)ChildFDMList.size();}
383   /// Gets a particular child FDM.
384   childData* GetChildFDM(int i) {return ChildFDMList[i];}
385   /// Marks this instance of the Exec object as a "child" object.
386   void SetChild(bool ch) {IsChild = ch;}
387
388   /** Sets the output (logging) mechanism for this run.
389       Calling this function passes the name of an output directives file to
390       the FGOutput object associated with this run. The call to this function
391       should be made prior to loading an aircraft model. This call results in an
392       FGOutput object being built as the first Output object in the FDMExec-managed
393       list of Output objects that may be created for an aircraft model. If this call
394       is made after an aircraft model is loaded, there is no effect. Any Output
395       objects added by the aircraft model itself (in an &lt;output> element) will be
396       added after this one. Care should be taken not to refer to the same file
397       name.
398       An output directives file contains an &lt;output> &lt;/output> element, within
399       which should be specified the parameters or parameter groups that should
400       be logged.
401       @param fname the filename of an output directives file.
402     */
403   bool SetOutputDirectives(const string& fname);
404
405   /** Forces the specified output object to print its items once */
406   void ForceOutput(int idx=0);
407
408   /** Sets (or overrides) the output filename
409       @param fname the name of the file to output data to
410       @return true if successful, false if there is no output specified for the flight model */
411   bool SetOutputFileName(const string& fname) {
412     if (Outputs.size() > 0) Outputs[0]->SetOutputFileName(fname);
413     else return false;
414     return true;
415   }
416
417   /** Retrieves the current output filename.
418       @return the name of the output file for the first output specified by the flight model.
419               If none is specified, the empty string is returned. */
420   string GetOutputFileName(void) {
421     if (Outputs.size() > 0) return Outputs[0]->GetOutputFileName();
422     else return string("");
423   }
424
425   /** Executes trimming in the selected mode.
426   *   @param mode Specifies how to trim:
427   * - tLongitudinal=0
428   * - tFull
429   * - tGround
430   * - tPullup
431   * - tCustom
432   * - tTurn
433   * - tNone  */
434   void DoTrim(int mode);
435 //  void DoTrimAnalysis(int mode);
436
437   /// Disables data logging to all outputs.
438   void DisableOutput(void);
439   /// Enables data logging to all outputs.
440   void EnableOutput(void);
441   /// Pauses execution by preventing time from incrementing.
442   void Hold(void) {holding = true;}
443   /// Resumes execution from a "Hold".
444   void Resume(void) {holding = false;}
445   /// Returns true if the simulation is Holding (i.e. simulation time is not moving).
446   bool Holding(void) {return holding;}
447   /// Resets the initial conditions object and prepares the simulation to run again.
448   void ResetToInitialConditions(void);
449   /// Sets the debug level.
450   void SetDebugLevel(int level) {debug_lvl = level;}
451
452   struct PropertyCatalogStructure {
453     /// Name of the property.
454     string base_string;
455     /// The node for the property.
456     FGPropertyManager *node;
457   };
458
459   /** Builds a catalog of properties.
460   *   This function descends the property tree and creates a list (an STL vector)
461   *   containing the name and node for all properties.
462   *   @param pcs The "root" property catalog structure pointer.  */
463   void BuildPropertyCatalog(struct PropertyCatalogStructure* pcs);
464
465   /** Retrieves property or properties matching the supplied string.
466   *   A string is returned that contains a carriage return delimited list of all
467   *   strings in the property catalog that matches the supplied check string.
468   *   @param check The string to search for in the property catalog.
469   *   @return the carriage-return-delimited string containing all matching strings
470   *               in the catalog.  */
471   string QueryPropertyCatalog(const string& check);
472
473   // Print the contents of the property catalog for the loaded aircraft.
474   void PrintPropertyCatalog(void);
475
476   vector<string>& GetPropertyCatalog(void) {return PropertyCatalog;}
477
478   /// Use the MSIS atmosphere model.
479   void UseAtmosphereMSIS(void);
480
481   /// Use the Mars atmosphere model. (Not operative yet.)
482   void UseAtmosphereMars(void);
483
484   void SetTrimStatus(bool status){ trim_status = status; }
485   bool GetTrimStatus(void) const { return trim_status; }
486   void SetTrimMode(int mode){ ta_mode = mode; }
487   int GetTrimMode(void) const { return ta_mode; }
488
489   /// Returns the cumulative simulation time in seconds.
490   double GetSimTime(void) const { return sim_time; }
491
492   /// Returns the simulation delta T.
493   double GetDeltaT(void) {return dT;}
494
495   /// Suspends the simulation and sets the delta T to zero.
496   void SuspendIntegration(void) {saved_dT = dT; dT = 0.0;}
497
498   /// Resumes the simulation by resetting delta T to the correct value.
499   void ResumeIntegration(void)  {dT = saved_dT;}
500
501   /** Returns the simulation suspension state.
502       @return true if suspended, false if executing  */
503   bool IntegrationSuspended(void) {return dT == 0.0;}
504
505   /** Sets the current sim time.
506       @param cur_time the current time
507       @return the current simulation time.      */
508   double Setsim_time(double cur_time) {
509     sim_time = cur_time;
510     return sim_time;
511   }
512
513   /** Sets the integration time step for the simulation executive.
514       @param delta_t the time step in seconds.     */
515   void Setdt(double delta_t) { dT = delta_t; }
516
517   /** Sets the root directory where JSBSim starts looking for its system directories.
518       @param rootDir the string containing the root directory. */
519   void SetRootDir(const string& rootDir) {RootDir = rootDir;}
520
521   /** Retrieves the Root Directory.
522       @return the string representing the root (base) JSBSim directory. */
523   const string& GetRootDir(void) const {return RootDir;}
524
525   /** Increments the simulation time.
526       @return the new simulation time.     */
527   double IncrTime(void) {
528     sim_time += dT;
529     return sim_time;
530   }
531
532   /** Retrieves the current debug level setting. */
533   int GetDebugLevel(void) const {return debug_lvl;};
534
535 private:
536   int Error;
537   unsigned int Frame;
538   unsigned int IdFDM;
539   unsigned short Terminate;
540   double dT;
541   double saved_dT;
542   double sim_time;
543   bool holding;
544   bool Constructing;
545   bool modelLoaded;
546   bool IsChild;
547   string modelName;
548   string AircraftPath;
549   string FullAircraftPath;
550   string EnginePath;
551   string SystemsPath;
552   string CFGVersion;
553   string Release;
554   string RootDir;
555
556   bool trim_status;
557   int ta_mode;
558
559   FGGroundCallback*   GroundCallback;
560   FGAtmosphere*       Atmosphere;
561   FGFCS*              FCS;
562   FGPropulsion*       Propulsion;
563   FGMassBalance*      MassBalance;
564   FGAerodynamics*     Aerodynamics;
565   FGInertial*         Inertial;
566   FGGroundReactions*  GroundReactions;
567   FGExternalReactions* ExternalReactions;
568   FGBuoyantForces*    BuoyantForces;
569   FGAircraft*         Aircraft;
570   FGPropagate*        Propagate;
571   FGAuxiliary*        Auxiliary;
572   FGInput*            Input;
573   FGScript*           Script;
574   FGInitialCondition* IC;
575   FGTrim*             Trim;
576
577   FGPropertyManager* Root;
578   bool StandAlone;
579   FGPropertyManager* instance;
580   
581   // The FDM counter is used to give each child FDM an unique ID. The root FDM has the ID 0
582   unsigned int*      FDMctr;
583
584   vector <string> PropertyCatalog;
585   vector <FGOutput*> Outputs;
586   vector <childData*> ChildFDMList;
587   vector <FGModel*> Models;
588
589   bool ReadFileHeader(Element*);
590   bool ReadChild(Element*);
591   bool ReadPrologue(Element*);
592   void ResetToInitialConditions(int mode);
593   bool Allocate(void);
594   bool DeAllocate(void);
595   void Initialize(FGInitialCondition *FGIC);
596
597   void Debug(int from);
598 };
599 }
600 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
601 #endif