JSBSim Flight Dynamics Model  1.0 (02 March 2017)
An Open Source Flight Dynamics and Control Software Library in C++
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 "FGJSBBase.h"
48 #include "input_output/FGPropertyManager.h"
49 #include "models/FGPropagate.h"
50 #include "math/FGColumnVector3.h"
51 #include "models/FGOutput.h"
52 #include "simgear/misc/sg_path.hxx"
53 
54 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
55 DEFINITIONS
56 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
57 
58 #define ID_FDMEXEC "$Id: FGFDMExec.h,v 1.106 2017/02/25 14:23:18 bcoconni Exp $"
59 
60 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
61 FORWARD DECLARATIONS
62 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
63 
64 namespace JSBSim {
65 
66 class FGScript;
67 class FGTrim;
68 class FGAerodynamics;
69 class FGAircraft;
70 class FGAtmosphere;
71 class FGAccelerations;
72 class FGWinds;
73 class FGAuxiliary;
74 class FGBuoyantForces;
75 class FGExternalReactions;
76 class FGGroundReactions;
77 class FGFCS;
78 class FGInertial;
79 class FGInput;
80 class FGPropulsion;
81 class FGMassBalance;
82 class FGTrim;
83 
84 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
85 CLASS DOCUMENTATION
86 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
87 
185 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
186 CLASS DECLARATION
187 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
188 
189 class FGFDMExec : public FGJSBBase
190 {
191  struct childData {
192  FGFDMExec* exec;
193  std::string info;
194  FGColumnVector3 Loc;
195  FGColumnVector3 Orient;
196  bool mated;
197  bool internal;
198 
199  childData(void) {
200  info = "";
201  Loc = FGColumnVector3(0,0,0);
202  Orient = FGColumnVector3(0,0,0);
203  mated = true;
204  internal = false;
205  }
206 
207  void Run(void) {exec->Run();}
208  void AssignState(FGPropagate* source_prop) {
209  exec->GetPropagate()->SetVState(source_prop->GetVState());
210  }
211 
212  ~childData(void) {
213  delete exec;
214  }
215  };
216 
217 public:
218 
220  FGFDMExec(FGPropertyManager* root = 0, unsigned int* fdmctr = 0);
221 
223  ~FGFDMExec();
224 
225  // This list of enums is very important! The order in which models are listed
226  // here determines the order of execution of the models.
227  //
228  // There are some conditions that need to be met :
229  // 1. FCS can request mass geometry changes via the inertia/pointmass-*
230  // properties so it must be executed before MassBalance
231  // 2. MassBalance must be executed before Propulsion, Aerodynamics,
232  // GroundReactions, ExternalReactions and BuoyantForces to ensure that
233  // their moments are computed with the updated CG position.
234  enum eModels { ePropagate=0,
235  eInput,
236  eInertial,
237  eAtmosphere,
238  eWinds,
239  eSystems,
240  eMassBalance,
241  eAuxiliary,
242  ePropulsion,
243  eAerodynamics,
244  eGroundReactions,
245  eExternalReactions,
246  eBuoyantForces,
247  eAircraft,
248  eAccelerations,
249  eOutput,
250  eNumStandardModels };
251 
253  void Unbind(void) {instance->Unbind();}
254 
257  bool Run(void);
258 
262  bool RunIC(void);
263 
272 
288  bool LoadModel(const SGPath& AircraftPath, const SGPath& EnginePath,
289  const SGPath& SystemsPath, const std::string& model,
290  bool addModelToPath = true);
291 
302  bool LoadModel(const std::string& model, bool addModelToPath = true);
303 
314  bool LoadScript(const SGPath& Script, double deltaT=0.0,
315  const SGPath& initfile=SGPath());
316 
320  bool SetEnginePath(const SGPath& path) {
321  EnginePath = GetFullPath(path);
322  return true;
323  }
324 
329  bool SetAircraftPath(const SGPath& path) {
330  AircraftPath = GetFullPath(path);
331  return true;
332  }
333 
337  bool SetSystemsPath(const SGPath& path) {
338  SystemsPath = GetFullPath(path);
339  return true;
340  }
341 
345  FGAtmosphere* GetAtmosphere(void) {return (FGAtmosphere*)Models[eAtmosphere];}
347  FGAccelerations* GetAccelerations(void) {return (FGAccelerations*)Models[eAccelerations];}
349  FGWinds* GetWinds(void) {return (FGWinds*)Models[eWinds];}
351  FGFCS* GetFCS(void) {return (FGFCS*)Models[eSystems];}
353  FGPropulsion* GetPropulsion(void) {return (FGPropulsion*)Models[ePropulsion];}
355  FGMassBalance* GetMassBalance(void) {return (FGMassBalance*)Models[eMassBalance];}
357  FGAerodynamics* GetAerodynamics(void){return (FGAerodynamics*)Models[eAerodynamics];}
359  FGInertial* GetInertial(void) {return (FGInertial*)Models[eInertial];}
361  FGGroundReactions* GetGroundReactions(void) {return (FGGroundReactions*)Models[eGroundReactions];}
363  FGExternalReactions* GetExternalReactions(void) {return (FGExternalReactions*)Models[eExternalReactions];}
365  FGBuoyantForces* GetBuoyantForces(void) {return (FGBuoyantForces*)Models[eBuoyantForces];}
367  FGAircraft* GetAircraft(void) {return (FGAircraft*)Models[eAircraft];}
369  FGPropagate* GetPropagate(void) {return (FGPropagate*)Models[ePropagate];}
371  FGAuxiliary* GetAuxiliary(void) {return (FGAuxiliary*)Models[eAuxiliary];}
373  FGInput* GetInput(void) {return (FGInput*)Models[eInput];}
375  FGOutput* GetOutput(void) {return (FGOutput*)Models[eOutput];}
383  FGScript* GetScript(void) {return Script;}
385  FGInitialCondition* GetIC(void) {return IC;}
387  FGTrim* GetTrim(void);
389 
391  const SGPath& GetEnginePath(void) {return EnginePath;}
393  const SGPath& GetAircraftPath(void) {return AircraftPath;}
395  const SGPath& GetSystemsPath(void) {return SystemsPath;}
397  const SGPath& GetFullAircraftPath(void) {return FullAircraftPath;}
398 
402  inline double GetPropertyValue(const std::string& property)
403  { return instance->GetNode()->GetDouble(property); }
404 
408  inline void SetPropertyValue(const std::string& property, double value) {
409  instance->GetNode()->SetDouble(property, value);
410  }
411 
413  const std::string& GetModelName(void) const { return modelName; }
414 
418  std::vector <std::string> EnumerateFDMs(void);
420  int GetFDMCount(void) const {return (int)ChildFDMList.size();}
422  childData* GetChildFDM(int i) const {return ChildFDMList[i];}
424  void SetChild(bool ch) {IsChild = ch;}
425 
441  bool SetOutputDirectives(const SGPath& fname)
442  { return Output->SetDirectivesFile(GetFullPath(fname)); }
443 
445  void ForceOutput(int idx=0) { Output->ForceOutput(idx); }
446 
448  void SetLoggingRate(double rate) { Output->SetRateHz(rate); }
449 
454  bool SetOutputFileName(const int n, const std::string& fname) { return Output->SetOutputName(n, fname); }
455 
460  std::string GetOutputFileName(int n) const { return Output->GetOutputName(n); }
461 
471  void DoTrim(int mode);
472 
474  void DisableOutput(void) { Output->Disable(); }
476  void EnableOutput(void) { Output->Enable(); }
478  void Hold(void) {holding = true;}
480  void EnableIncrementThenHold(int Timesteps) {TimeStepsUntilHold = Timesteps; IncrementThenHolding = true;}
482  void CheckIncrementalHold(void);
484  void Resume(void) {holding = false;}
486  bool Holding(void) {return holding;}
492  void ResetToInitialConditions(int mode);
494  void SetDebugLevel(int level) {debug_lvl = level;}
495 
498  std::string base_string;
500  FGPropertyNode_ptr node;
501  };
502 
508 
515  std::string QueryPropertyCatalog(const std::string& check);
516 
517  // Print the contents of the property catalog for the loaded aircraft.
518  void PrintPropertyCatalog(void);
519 
520  // Print the simulation configuration
521  void PrintSimulationConfiguration(void) const;
522 
523  std::vector<std::string>& GetPropertyCatalog(void) {return PropertyCatalog;}
524 
525  void SetTrimStatus(bool status){ trim_status = status; }
526  bool GetTrimStatus(void) const { return trim_status; }
527  void SetTrimMode(int mode){ ta_mode = mode; }
528  int GetTrimMode(void) const { return ta_mode; }
529 
530  std::string GetPropulsionTankReport();
531 
533  double GetSimTime(void) const { return sim_time; }
534 
536  double GetDeltaT(void) const {return dT;}
537 
539  void SuspendIntegration(void) {saved_dT = dT; dT = 0.0;}
540 
542  void ResumeIntegration(void) {dT = saved_dT;}
543 
546  bool IntegrationSuspended(void) const {return dT == 0.0;}
547 
551  double Setsim_time(double cur_time) {
552  sim_time = cur_time;
553  GetGroundCallback()->SetTime(sim_time);
554  return sim_time;
555  }
556 
559  void Setdt(double delta_t) { dT = delta_t; }
560 
563  void SetRootDir(const SGPath& rootDir) {RootDir = rootDir;}
564 
567  const SGPath& GetRootDir(void) const {return RootDir;}
568 
572  double IncrTime(void) {
573  if (!holding && !IntegrationSuspended()) {
574  sim_time += dT;
575  GetGroundCallback()->SetTime(sim_time);
576  Frame++;
577  }
578  return sim_time;
579  }
580 
582  unsigned int GetFrame(void) const {return Frame;}
583 
585  int GetDebugLevel(void) const {return debug_lvl;};
586 
589  void Initialize(FGInitialCondition *FGIC);
590 
595  void SetHoldDown(bool hd);
596 
600  bool GetHoldDown(void) const {return HoldDown;}
601 
602 private:
603  int Error;
604  unsigned int Frame;
605  unsigned int IdFDM;
606  int disperse;
607  unsigned short Terminate;
608  double dT;
609  double saved_dT;
610  double sim_time;
611  bool holding;
612  bool IncrementThenHolding;
613  int TimeStepsUntilHold;
614  int RandomSeed;
615  bool Constructing;
616  bool modelLoaded;
617  bool IsChild;
618  std::string modelName;
619  SGPath AircraftPath;
620  SGPath FullAircraftPath;
621  SGPath EnginePath;
622  SGPath SystemsPath;
623  std::string CFGVersion;
624  std::string Release;
625  SGPath RootDir;
626 
627  // Standard Model pointers - shortcuts for internal executive use only.
628  FGPropagate* Propagate;
629  FGInertial* Inertial;
630  FGAtmosphere* Atmosphere;
631  FGWinds* Winds;
632  FGAuxiliary* Auxiliary;
633  FGFCS* FCS;
634  FGPropulsion* Propulsion;
635  FGAerodynamics* Aerodynamics;
636  FGGroundReactions* GroundReactions;
637  FGExternalReactions* ExternalReactions;
638  FGBuoyantForces* BuoyantForces;
639  FGMassBalance* MassBalance;
640  FGAircraft* Aircraft;
641  FGAccelerations* Accelerations;
642  FGOutput* Output;
643 
644  bool trim_status;
645  int ta_mode;
646  unsigned int ResetMode;
647  int trim_completed;
648 
649  FGScript* Script;
650  FGInitialCondition* IC;
651  FGTrim* Trim;
652 
653  FGPropertyManager* Root;
654  bool StandAlone;
655  FGPropertyManager* instance;
656 
657  bool HoldDown;
658 
659  // The FDM counter is used to give each child FDM an unique ID. The root FDM has the ID 0
660  unsigned int* FDMctr;
661 
662  std::vector <std::string> PropertyCatalog;
663  std::vector <childData*> ChildFDMList;
664  std::vector <FGModel*> Models;
665 
666  bool ReadFileHeader(Element*);
667  bool ReadChild(Element*);
668  bool ReadPrologue(Element*);
669  void SRand(int sr);
670  int SRand(void) const {return RandomSeed;}
671  void LoadInputs(unsigned int idx);
672  void LoadPlanetConstants(void);
673  void LoadModelConstants(void);
674  bool Allocate(void);
675  bool DeAllocate(void);
676  int GetDisperse(void) const {return disperse;}
677  SGPath GetFullPath(const SGPath& name) {
678  if (name.isRelative())
679  return RootDir/name.utf8Str();
680  else
681  return name;
682  }
683 
684  void Debug(int from);
685 };
686 }
687 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
688 #endif
Encapsulates an Aircraft and its systems.
Definition: FGAircraft.h:110
static void SetGroundCallback(FGGroundCallback *gc)
Sets the ground callback pointer.
Definition: FGLocation.h:393
FGAccelerations * GetAccelerations(void)
Returns the FGAccelerations pointer.
Definition: FGFDMExec.h:347
void ForceOutput(int idx=0)
Forces the specified output object to print its items once.
Definition: FGFDMExec.h:445
FGInitialCondition * GetIC(void)
Returns a pointer to the FGInitialCondition object.
Definition: FGFDMExec.h:385
FGInertial * GetInertial(void)
Returns the FGInertial pointer.
Definition: FGFDMExec.h:359
Encapsulates the Buoyant forces calculations.
bool LoadScript(const SGPath &Script, double deltaT=0.0, const SGPath &initfile=SGPath())
Loads a script.
Definition: FGFDMExec.cpp:653
const std::string & GetModelName(void) const
Returns the model name.
Definition: FGFDMExec.h:413
FGTrim * GetTrim(void)
Returns a pointer to the FGTrim object.
Definition: FGFDMExec.cpp:1106
FGOutput * GetOutput(void)
Returns the FGOutput pointer.
Definition: FGFDMExec.h:375
std::vector< std::string > EnumerateFDMs(void)
Returns a vector of strings representing the names of all loaded models (future)
Definition: FGFDMExec.cpp:637
void SuspendIntegration(void)
Suspends the simulation and sets the delta T to zero.
Definition: FGFDMExec.h:539
bool RunIC(void)
Initializes the sim from the initial condition object and executes each scheduled model without integ...
Definition: FGFDMExec.cpp:552
const SGPath & GetFullAircraftPath(void)
Retrieves the full aircraft path name.
Definition: FGFDMExec.h:397
FGAuxiliary * GetAuxiliary(void)
Returns the FGAuxiliary pointer.
Definition: FGFDMExec.h:371
Encapsulates the aerodynamic calculations.
This class provides callback slots to get ground specific data.
void SetPropertyValue(const std::string &property, double value)
Sets a property value.
Definition: FGFDMExec.h:408
FGInput * GetInput(void)
Returns the FGInput pointer.
Definition: FGFDMExec.h:373
const SGPath & GetAircraftPath(void)
Retrieves the aircraft path.
Definition: FGFDMExec.h:393
double GetPropertyValue(const std::string &property)
Retrieves the value of a property.
Definition: FGFDMExec.h:402
void DoTrim(int mode)
Executes trimming in the selected mode.
Definition: FGFDMExec.cpp:1139
void DisableOutput(void)
Disables data logging to all outputs.
Definition: FGFDMExec.h:474
void SetGroundCallback(FGGroundCallback *gc)
Sets the ground callback pointer.
Definition: FGFDMExec.h:271
void SetHoldDown(bool hd)
Sets the property forces/hold-down.
Definition: FGFDMExec.cpp:624
Models inertial forces (e.g.
Definition: FGInertial.h:70
void SetChild(bool ch)
Marks this instance of the Exec object as a "child" object.
Definition: FGFDMExec.h:424
void EnableOutput(void)
Enables data logging to all outputs.
Definition: FGFDMExec.h:476
std::string base_string
Name of the property.
Definition: FGFDMExec.h:498
void BuildPropertyCatalog(struct PropertyCatalogStructure *pcs)
Builds a catalog of properties.
Definition: FGFDMExec.cpp:904
bool SetOutputFileName(const int n, const std::string &fname)
Sets (or overrides) the output filename.
Definition: FGFDMExec.h:454
FGPropertyManager * GetPropertyManager(void)
Returns a pointer to the property manager object.
Definition: FGFDMExec.cpp:1099
void SetRootDir(const SGPath &rootDir)
Sets the root directory where JSBSim starts looking for its system directories.
Definition: FGFDMExec.h:563
void Initialize(FGInitialCondition *FGIC)
Initializes the simulation with initial conditions.
Definition: FGFDMExec.cpp:591
void SetDebugLevel(int level)
Sets the debug level.
Definition: FGFDMExec.h:494
Models atmospheric disturbances: winds, gusts, turbulence, downbursts, etc.
Definition: FGWinds.h:119
void SetLoggingRate(double rate)
Sets the logging rate in Hz for all output objects (if any).
Definition: FGFDMExec.h:448
double Setsim_time(double cur_time)
Sets the current sim time.
Definition: FGFDMExec.h:551
void Setdt(double delta_t)
Sets the integration time step for the simulation executive.
Definition: FGFDMExec.h:559
FGExternalReactions * GetExternalReactions(void)
Returns the FGExternalReactions pointer.
Definition: FGFDMExec.h:363
FGBuoyantForces * GetBuoyantForces(void)
Returns the FGBuoyantForces pointer.
Definition: FGFDMExec.h:365
int GetDebugLevel(void) const
Retrieves the current debug level setting.
Definition: FGFDMExec.h:585
Models the EOM and integration/propagation of state.
Definition: FGPropagate.h:102
FGWinds * GetWinds(void)
Returns the FGWinds pointer.
Definition: FGFDMExec.h:349
Propulsion management class.
Definition: FGPropulsion.h:106
childData * GetChildFDM(int i) const
Gets a particular child FDM.
Definition: FGFDMExec.h:422
void Hold(void)
Pauses execution by preventing time from incrementing.
Definition: FGFDMExec.h:478
JSBSim Base class.
Definition: FGJSBBase.h:80
FGAircraft * GetAircraft(void)
Returns the FGAircraft pointer.
Definition: FGFDMExec.h:367
Encapsulates the JSBSim scripting capability.
Definition: FGScript.h:172
FGGroundReactions * GetGroundReactions(void)
Returns the FGGroundReactions pointer.
Definition: FGFDMExec.h:361
int GetFDMCount(void) const
Gets the number of child FDMs.
Definition: FGFDMExec.h:420
std::string GetOutputFileName(int n) const
Retrieves the current output filename.
Definition: FGFDMExec.h:460
const SGPath & GetRootDir(void) const
Retrieves the Root Directory.
Definition: FGFDMExec.h:567
void EnableIncrementThenHold(int Timesteps)
Turn on hold after increment.
Definition: FGFDMExec.h:480
FGGroundCallback * GetGroundCallback(void)
Get a pointer to the ground callback currently used.
Definition: FGFDMExec.h:381
bool SetOutputDirectives(const SGPath &fname)
Sets the output (logging) mechanism for this run.
Definition: FGFDMExec.h:441
FGPropertyNode_ptr node
The node for the property.
Definition: FGFDMExec.h:500
Handles simulation input.
Definition: FGInput.h:91
Models an empty, abstract base atmosphere class.
Definition: FGAtmosphere.h:84
This class implements a 3 element column vector.
void ResumeIntegration(void)
Resumes the simulation by resetting delta T to the correct value.
Definition: FGFDMExec.h:542
The trimming routine for JSBSim.
Definition: FGTrim.h:130
bool Holding(void)
Returns true if the simulation is Holding (i.e. simulation time is not moving).
Definition: FGFDMExec.h:486
Initializes the simulation run.
FGFCS * GetFCS(void)
Returns the FGFCS pointer.
Definition: FGFDMExec.h:351
Encapsulates the Flight Control System (FCS) functionality.
Definition: FGFCS.h:193
bool SetSystemsPath(const SGPath &path)
Sets the path to the systems config file directories.
Definition: FGFDMExec.h:337
bool SetEnginePath(const SGPath &path)
Sets the path to the engine config file directories.
Definition: FGFDMExec.h:320
bool IntegrationSuspended(void) const
Returns the simulation suspension state.
Definition: FGFDMExec.h:546
std::string QueryPropertyCatalog(const std::string &check)
Retrieves property or properties matching the supplied string.
Definition: FGFDMExec.cpp:932
double GetSimTime(void) const
Returns the cumulative simulation time in seconds.
Definition: FGFDMExec.h:533
void Resume(void)
Resumes execution from a "Hold".
Definition: FGFDMExec.h:484
Manages ground reactions modeling.
Handles the calculation of accelerations.
Encapsulates various uncategorized scheduled functions.
Definition: FGAuxiliary.h:109
FGFDMExec(FGPropertyManager *root=0, unsigned int *fdmctr=0)
Default constructor.
Definition: FGFDMExec.cpp:85
double GetDeltaT(void) const
Returns the simulation delta T.
Definition: FGFDMExec.h:536
FGAerodynamics * GetAerodynamics(void)
Returns the FGAerodynamics pointer.
Definition: FGFDMExec.h:357
FGPropulsion * GetPropulsion(void)
Returns the FGPropulsion pointer.
Definition: FGFDMExec.h:353
void CheckIncrementalHold(void)
Checks if required to hold afer increment.
Definition: FGFDMExec.cpp:1115
bool Run(void)
This function executes each scheduled model in succession.
Definition: FGFDMExec.cpp:310
static FGGroundCallback * GetGroundCallback(void)
Get a pointer to the ground callback currently used.
Definition: FGLocation.h:404
FGScript * GetScript(void)
Retrieves the script object.
Definition: FGFDMExec.h:383
Encapsulates the JSBSim simulation executive.
Definition: FGFDMExec.h:189
unsigned int GetFrame(void) const
Retrieves the current frame count.
Definition: FGFDMExec.h:582
const SGPath & GetSystemsPath(void)
Retrieves the systems path.
Definition: FGFDMExec.h:395
Models weight, balance and moment of inertia information.
~FGFDMExec()
Default destructor.
Definition: FGFDMExec.cpp:184
bool LoadModel(const SGPath &AircraftPath, const SGPath &EnginePath, const SGPath &SystemsPath, const std::string &model, bool addModelToPath=true)
Loads an aircraft model.
Definition: FGFDMExec.cpp:666
void ResetToInitialConditions(int mode)
Resets the initial conditions object and prepares the simulation to run again.
Definition: FGFDMExec.cpp:600
const SGPath & GetEnginePath(void)
Retrieves the engine path.
Definition: FGFDMExec.h:391
bool GetHoldDown(void) const
Gets the value of the property forces/hold-down.
Definition: FGFDMExec.h:600
void Unbind(void)
Unbind all tied JSBSim properties.
Definition: FGFDMExec.h:253
Manages the external and/or arbitrary forces.
bool SetAircraftPath(const SGPath &path)
Sets the path to the aircraft config file directories.
Definition: FGFDMExec.h:329
Handles simulation output.
Definition: FGOutput.h:131
FGPropagate * GetPropagate(void)
Returns the FGPropagate pointer.
Definition: FGFDMExec.h:369
double IncrTime(void)
Increments the simulation time if not in Holding mode.
Definition: FGFDMExec.h:572
FGMassBalance * GetMassBalance(void)
Returns the FGAircraft pointer.
Definition: FGFDMExec.h:355