JSBSim Flight Dynamics Model  1.1.11 (13 Feb 2022)
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
11  Software Foundation; either version 2 of the License, or (at your option) any
12  later 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
20  with this program; if not, write to the Free Software Foundation, Inc., 59
21  Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 
23  Further information about the GNU Lesser General Public License can also be
24  found on 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 <memory>
45 #include <random>
46 
47 #include "models/FGPropagate.h"
48 #include "models/FGOutput.h"
49 #include "math/FGTemplateFunc.h"
50 
51 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
52 FORWARD DECLARATIONS
53 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
54 
55 namespace JSBSim {
56 
57 class FGScript;
58 class FGTrim;
59 class FGAerodynamics;
60 class FGAircraft;
61 class FGAtmosphere;
62 class FGAccelerations;
63 class FGWinds;
64 class FGAuxiliary;
65 class FGBuoyantForces;
66 class FGExternalReactions;
67 class FGGroundReactions;
68 class FGFCS;
69 class FGInertial;
70 class FGInput;
71 class FGPropulsion;
72 class FGMassBalance;
73 class FGTrim;
74 
76  public:
77  TrimFailureException(const std::string& msg) : BaseException(msg) {}
78 };
79 
80 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
81 CLASS DOCUMENTATION
82 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
83 
181 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
182 CLASS DECLARATION
183 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
184 
185 class FGFDMExec : public FGJSBBase
186 {
187  struct childData {
188  FGFDMExec* exec;
189  std::string info;
190  FGColumnVector3 Loc;
191  FGColumnVector3 Orient;
192  bool mated;
193  bool internal;
194 
195  childData(void) {
196  info = "";
197  Loc = FGColumnVector3(0,0,0);
198  Orient = FGColumnVector3(0,0,0);
199  mated = true;
200  internal = false;
201  }
202 
203  void Run(void) {exec->Run();}
204  void AssignState(FGPropagate* source_prop) {
205  exec->GetPropagate()->SetVState(source_prop->GetVState());
206  }
207 
208  ~childData(void) {
209  delete exec;
210  }
211  };
212 
213 public:
214 
216  FGFDMExec(FGPropertyManager* root = 0, unsigned int* fdmctr = 0);
217 
219  ~FGFDMExec();
220 
221  // This list of enums is very important! The order in which models are listed
222  // here determines the order of execution of the models.
223  //
224  // There are some conditions that need to be met :
225  // 1. FCS can request mass geometry changes via the inertia/pointmass-*
226  // properties so it must be executed before MassBalance
227  // 2. MassBalance must be executed before Propulsion, Aerodynamics,
228  // GroundReactions, ExternalReactions and BuoyantForces to ensure that
229  // their moments are computed with the updated CG position.
230  enum eModels { ePropagate=0,
231  eInput,
232  eInertial,
233  eAtmosphere,
234  eWinds,
235  eSystems,
236  eMassBalance,
237  eAuxiliary,
238  ePropulsion,
239  eAerodynamics,
240  eGroundReactions,
241  eExternalReactions,
242  eBuoyantForces,
243  eAircraft,
244  eAccelerations,
245  eOutput,
246  eNumStandardModels };
247 
249  void Unbind(void) {instance->Unbind();}
250 
253  bool Run(void);
254 
258  bool RunIC(void);
259 
275  bool LoadModel(const SGPath& AircraftPath, const SGPath& EnginePath,
276  const SGPath& SystemsPath, const std::string& model,
277  bool addModelToPath = true);
278 
289  bool LoadModel(const std::string& model, bool addModelToPath = true);
290 
302  bool LoadScript(const SGPath& Script, double deltaT=0.0,
303  const SGPath& initfile=SGPath());
304 
311  bool SetEnginePath(const SGPath& path) {
312  EnginePath = GetFullPath(path);
313  return true;
314  }
315 
323  bool SetAircraftPath(const SGPath& path) {
324  AircraftPath = GetFullPath(path);
325  return true;
326  }
327 
334  bool SetSystemsPath(const SGPath& path) {
335  SystemsPath = GetFullPath(path);
336  return true;
337  }
338 
345  bool SetOutputPath(const SGPath& path) {
346  OutputPath = GetFullPath(path);
347  return true;
348  }
349 
353  FGAtmosphere* GetAtmosphere(void) {return (FGAtmosphere*)Models[eAtmosphere];}
355  FGAccelerations* GetAccelerations(void) {return (FGAccelerations*)Models[eAccelerations];}
357  FGWinds* GetWinds(void) {return (FGWinds*)Models[eWinds];}
359  FGFCS* GetFCS(void) {return (FGFCS*)Models[eSystems];}
361  FGPropulsion* GetPropulsion(void) {return (FGPropulsion*)Models[ePropulsion];}
363  FGMassBalance* GetMassBalance(void) {return (FGMassBalance*)Models[eMassBalance];}
365  FGAerodynamics* GetAerodynamics(void){return (FGAerodynamics*)Models[eAerodynamics];}
367  FGInertial* GetInertial(void) {return (FGInertial*)Models[eInertial];}
369  FGGroundReactions* GetGroundReactions(void) {return (FGGroundReactions*)Models[eGroundReactions];}
371  FGExternalReactions* GetExternalReactions(void) {return (FGExternalReactions*)Models[eExternalReactions];}
373  FGBuoyantForces* GetBuoyantForces(void) {return (FGBuoyantForces*)Models[eBuoyantForces];}
375  FGAircraft* GetAircraft(void) {return (FGAircraft*)Models[eAircraft];}
377  FGPropagate* GetPropagate(void) {return (FGPropagate*)Models[ePropagate];}
379  FGAuxiliary* GetAuxiliary(void) {return (FGAuxiliary*)Models[eAuxiliary];}
381  FGInput* GetInput(void) {return (FGInput*)Models[eInput];}
383  FGOutput* GetOutput(void) {return (FGOutput*)Models[eOutput];}
385  FGScript* GetScript(void) {return Script;}
387  FGInitialCondition* GetIC(void) {return IC;}
389  FGTrim* GetTrim(void);
391 
393  const SGPath& GetEnginePath(void) { return EnginePath; }
395  const SGPath& GetAircraftPath(void) { return AircraftPath; }
397  const SGPath& GetSystemsPath(void) { return SystemsPath; }
399  const SGPath& GetFullAircraftPath(void) { return FullAircraftPath; }
401  const SGPath& GetOutputPath(void) { return OutputPath; }
402 
406  inline double GetPropertyValue(const std::string& property)
407  { return instance->GetNode()->GetDouble(property); }
408 
412  inline void SetPropertyValue(const std::string& property, double value) {
413  instance->GetNode()->SetDouble(property, value);
414  }
415 
417  const std::string& GetModelName(void) const { return modelName; }
418 
422  std::vector <std::string> EnumerateFDMs(void);
424  int GetFDMCount(void) const {return (int)ChildFDMList.size();}
426  childData* GetChildFDM(int i) const {return ChildFDMList[i];}
428  void SetChild(bool ch) {IsChild = ch;}
429 
445  bool SetOutputDirectives(const SGPath& fname)
446  { return Output->SetDirectivesFile(GetFullPath(fname)); }
447 
449  void ForceOutput(int idx=0) { Output->ForceOutput(idx); }
450 
452  void SetLoggingRate(double rate) { Output->SetRateHz(rate); }
453 
458  bool SetOutputFileName(const int n, const std::string& fname) { return Output->SetOutputName(n, fname); }
459 
464  std::string GetOutputFileName(int n) const { return Output->GetOutputName(n); }
465 
475  void DoTrim(int mode);
476 
478  void DisableOutput(void) { Output->Disable(); }
480  void EnableOutput(void) { Output->Enable(); }
482  void Hold(void) {holding = true;}
484  void EnableIncrementThenHold(int Timesteps) {TimeStepsUntilHold = Timesteps; IncrementThenHolding = true;}
486  void CheckIncrementalHold(void);
488  void Resume(void) {holding = false;}
490  bool Holding(void) {return holding;}
492  static const int START_NEW_OUTPUT = 0x1;
493  static const int DONT_EXECUTE_RUN_IC = 0x2;
501  void ResetToInitialConditions(int mode);
503  void SetDebugLevel(int level) {debug_lvl = level;}
504 
507  std::string base_string;
509  FGPropertyNode_ptr node;
510  };
511 
517 
524  std::string QueryPropertyCatalog(const std::string& check);
525 
526  // Print the contents of the property catalog for the loaded aircraft.
527  void PrintPropertyCatalog(void);
528 
529  // Print the simulation configuration
530  void PrintSimulationConfiguration(void) const;
531 
532  std::vector<std::string>& GetPropertyCatalog(void) {return PropertyCatalog;}
533 
534  void SetTrimStatus(bool status){ trim_status = status; }
535  bool GetTrimStatus(void) const { return trim_status; }
536  void SetTrimMode(int mode){ ta_mode = mode; }
537  int GetTrimMode(void) const { return ta_mode; }
538 
539  std::string GetPropulsionTankReport();
540 
542  double GetSimTime(void) const { return sim_time; }
543 
545  double GetDeltaT(void) const {return dT;}
546 
548  void SuspendIntegration(void) {saved_dT = dT; dT = 0.0;}
549 
551  void ResumeIntegration(void) {dT = saved_dT;}
552 
555  bool IntegrationSuspended(void) const {return dT == 0.0;}
556 
560  double Setsim_time(double cur_time);
561 
564  void Setdt(double delta_t) { dT = delta_t; }
565 
578  void SetRootDir(const SGPath& rootDir) {RootDir = rootDir;}
579 
583  const SGPath& GetRootDir(void) const {return RootDir;}
584 
588  double IncrTime(void);
589 
591  unsigned int GetFrame(void) const {return Frame;}
592 
594  int GetDebugLevel(void) const {return debug_lvl;};
595 
598  void Initialize(FGInitialCondition *FGIC);
599 
604  void SetHoldDown(bool hd);
605 
609  bool GetHoldDown(void) const {return HoldDown;}
610 
611  FGTemplateFunc* GetTemplateFunc(const std::string& name) {
612  return TemplateFunctions.count(name) ? TemplateFunctions[name] : nullptr;
613  }
614 
615  void AddTemplateFunc(const std::string& name, Element* el) {
616  TemplateFunctions[name] = new FGTemplateFunc(this, el);
617  }
618 
619  const std::shared_ptr<std::default_random_engine>& GetRandomEngine(void) const
620  { return RandomEngine; }
621 
622 private:
623  unsigned int Frame;
624  unsigned int IdFDM;
625  int disperse;
626  unsigned short Terminate;
627  double dT;
628  double saved_dT;
629  double sim_time;
630  bool holding;
631  bool IncrementThenHolding;
632  int TimeStepsUntilHold;
633  bool Constructing;
634  bool modelLoaded;
635  bool IsChild;
636  std::string modelName;
637  SGPath AircraftPath;
638  SGPath FullAircraftPath;
639  SGPath EnginePath;
640  SGPath SystemsPath;
641  SGPath OutputPath;
642  std::string CFGVersion;
643  std::string Release;
644  SGPath RootDir;
645 
646  // Standard Model pointers - shortcuts for internal executive use only.
647  FGPropagate* Propagate;
648  FGInertial* Inertial;
649  FGAtmosphere* Atmosphere;
650  FGWinds* Winds;
651  FGAuxiliary* Auxiliary;
652  FGFCS* FCS;
653  FGPropulsion* Propulsion;
654  FGAerodynamics* Aerodynamics;
655  FGGroundReactions* GroundReactions;
656  FGExternalReactions* ExternalReactions;
657  FGBuoyantForces* BuoyantForces;
658  FGMassBalance* MassBalance;
659  FGAircraft* Aircraft;
660  FGAccelerations* Accelerations;
661  FGOutput* Output;
662 
663  bool trim_status;
664  int ta_mode;
665  unsigned int ResetMode;
666  int trim_completed;
667 
668  FGScript* Script;
669  FGInitialCondition* IC;
670  FGTrim* Trim;
671 
672  FGPropertyManager* Root;
673  bool StandAlone;
674  FGPropertyManager* instance;
675 
676  bool HoldDown;
677 
678  int RandomSeed;
679  std::shared_ptr<std::default_random_engine> RandomEngine;
680 
681  // The FDM counter is used to give each child FDM an unique ID. The root FDM
682  // has the ID 0
683  unsigned int* FDMctr;
684 
685  std::vector <std::string> PropertyCatalog;
686  std::vector <childData*> ChildFDMList;
687  std::vector <FGModel*> Models;
688  std::map<std::string, FGTemplateFunc_ptr> TemplateFunctions;
689 
690  bool ReadFileHeader(Element*);
691  bool ReadChild(Element*);
692  bool ReadPrologue(Element*);
693  void SRand(int sr);
694  int SRand(void) const {return RandomSeed;}
695  void LoadInputs(unsigned int idx);
696  void LoadPlanetConstants(void);
697  void LoadModelConstants(void);
698  bool Allocate(void);
699  bool DeAllocate(void);
700  void InitializeModels(void);
701  int GetDisperse(void) const {return disperse;}
702  SGPath GetFullPath(const SGPath& name) {
703  if (name.isRelative())
704  return RootDir/name.utf8Str();
705  else
706  return name;
707  }
708 
709  void Debug(int from);
710 };
711 }
712 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
713 #endif
JSBSim::FGFDMExec::SetHoldDown
void SetHoldDown(bool hd)
Sets the property forces/hold-down.
Definition: FGFDMExec.cpp:629
JSBSim::FGFDMExec::LoadScript
bool LoadScript(const SGPath &Script, double deltaT=0.0, const SGPath &initfile=SGPath())
Load a script.
Definition: FGFDMExec.cpp:658
JSBSim::FGFDMExec
Encapsulates the JSBSim simulation executive.
Definition: FGFDMExec.h:185
JSBSim::FGFDMExec::GetSystemsPath
const SGPath & GetSystemsPath(void)
Retrieves the systems path.
Definition: FGFDMExec.h:397
JSBSim::FGFDMExec::QueryPropertyCatalog
std::string QueryPropertyCatalog(const std::string &check)
Retrieves property or properties matching the supplied string.
Definition: FGFDMExec.cpp:952
JSBSim::FGFDMExec::START_NEW_OUTPUT
static const int START_NEW_OUTPUT
Mode flags for ResetToInitialConditions.
Definition: FGFDMExec.h:492
JSBSim::FGFDMExec::GetOutput
FGOutput * GetOutput(void)
Returns the FGOutput pointer.
Definition: FGFDMExec.h:383
JSBSim::FGFDMExec::IncrTime
double IncrTime(void)
Increments the simulation time if not in Holding mode.
Definition: FGFDMExec.cpp:221
JSBSim::FGFDMExec::SuspendIntegration
void SuspendIntegration(void)
Suspends the simulation and sets the delta T to zero.
Definition: FGFDMExec.h:548
JSBSim::FGColumnVector3
This class implements a 3 element column vector.
Definition: FGColumnVector3.h:63
JSBSim::FGAerodynamics
Encapsulates the aerodynamic calculations.
Definition: FGAerodynamics.h:113
JSBSim::FGExternalReactions
Manages the external and/or arbitrary forces and moments.
Definition: FGExternalReactions.h:121
JSBSim::FGFDMExec::GetIC
FGInitialCondition * GetIC(void)
Returns a pointer to the FGInitialCondition object.
Definition: FGFDMExec.h:387
JSBSim::FGFDMExec::SetRootDir
void SetRootDir(const SGPath &rootDir)
Set the root directory that is used to obtain absolute paths from relative paths.
Definition: FGFDMExec.h:578
JSBSim::FGFDMExec::GetInertial
FGInertial * GetInertial(void)
Returns the FGInertial pointer.
Definition: FGFDMExec.h:367
JSBSim::FGFDMExec::GetAircraftPath
const SGPath & GetAircraftPath(void)
Retrieves the aircraft path.
Definition: FGFDMExec.h:395
JSBSim::FGFDMExec::PropertyCatalogStructure
Definition: FGFDMExec.h:505
JSBSim::FGFDMExec::SetLoggingRate
void SetLoggingRate(double rate)
Sets the logging rate in Hz for all output objects (if any).
Definition: FGFDMExec.h:452
JSBSim::FGMassBalance
Models weight, balance and moment of inertia information.
Definition: FGMassBalance.h:122
JSBSim::FGFDMExec::GetModelName
const std::string & GetModelName(void) const
Returns the model name.
Definition: FGFDMExec.h:417
JSBSim::FGFDMExec::BuildPropertyCatalog
void BuildPropertyCatalog(struct PropertyCatalogStructure *pcs)
Builds a catalog of properties.
Definition: FGFDMExec.cpp:924
JSBSim::FGFDMExec::~FGFDMExec
~FGFDMExec()
Default destructor.
Definition: FGFDMExec.cpp:181
JSBSim::FGFDMExec::GetSimTime
double GetSimTime(void) const
Returns the cumulative simulation time in seconds.
Definition: FGFDMExec.h:542
JSBSim::FGOutput::ForceOutput
void ForceOutput(int idx)
Force an output instance to generate its output.
Definition: FGOutput.cpp:143
JSBSim::FGFDMExec::GetAircraft
FGAircraft * GetAircraft(void)
Returns the FGAircraft pointer.
Definition: FGFDMExec.h:375
JSBSim::FGFDMExec::IntegrationSuspended
bool IntegrationSuspended(void) const
Returns the simulation suspension state.
Definition: FGFDMExec.h:555
JSBSim::FGFDMExec::GetGroundReactions
FGGroundReactions * GetGroundReactions(void)
Returns the FGGroundReactions pointer.
Definition: FGFDMExec.h:369
JSBSim::FGFDMExec::GetPropertyManager
FGPropertyManager * GetPropertyManager(void)
Returns a pointer to the property manager object.
Definition: FGFDMExec.cpp:1121
JSBSim::FGFDMExec::SetOutputFileName
bool SetOutputFileName(const int n, const std::string &fname)
Sets (or overrides) the output filename.
Definition: FGFDMExec.h:458
JSBSim::FGFDMExec::SetPropertyValue
void SetPropertyValue(const std::string &property, double value)
Sets a property value.
Definition: FGFDMExec.h:412
JSBSim::FGFDMExec::GetRootDir
const SGPath & GetRootDir(void) const
Retrieve the Root Directory.
Definition: FGFDMExec.h:583
JSBSim::FGFDMExec::GetAuxiliary
FGAuxiliary * GetAuxiliary(void)
Returns the FGAuxiliary pointer.
Definition: FGFDMExec.h:379
JSBSim::BaseException
Definition: FGJSBBase.h:59
JSBSim::FGFDMExec::GetInput
FGInput * GetInput(void)
Returns the FGInput pointer.
Definition: FGFDMExec.h:381
JSBSim::FGFDMExec::SetDebugLevel
void SetDebugLevel(int level)
Sets the debug level.
Definition: FGFDMExec.h:503
JSBSim::FGOutput::SetDirectivesFile
bool SetDirectivesFile(const SGPath &fname)
Adds a new output instance to the Output Manager.
Definition: FGOutput.cpp:172
JSBSim::FGFDMExec::Setsim_time
double Setsim_time(double cur_time)
Sets the current sim time.
Definition: FGFDMExec.cpp:213
JSBSim::FGInput
Handles simulation input.
Definition: FGInput.h:84
JSBSim::FGFDMExec::DoTrim
void DoTrim(int mode)
Executes trimming in the selected mode.
Definition: FGFDMExec.cpp:1161
JSBSim::FGFDMExec::SetOutputDirectives
bool SetOutputDirectives(const SGPath &fname)
Sets the output (logging) mechanism for this run.
Definition: FGFDMExec.h:445
JSBSim::FGFDMExec::ResumeIntegration
void ResumeIntegration(void)
Resumes the simulation by resetting delta T to the correct value.
Definition: FGFDMExec.h:551
JSBSim::FGFDMExec::PropertyCatalogStructure::base_string
std::string base_string
Name of the property.
Definition: FGFDMExec.h:507
JSBSim::FGFDMExec::GetScript
FGScript * GetScript(void)
Retrieves the script object.
Definition: FGFDMExec.h:385
JSBSim::FGFDMExec::GetChildFDM
childData * GetChildFDM(int i) const
Gets a particular child FDM.
Definition: FGFDMExec.h:426
JSBSim::FGJSBBase
JSBSim Base class.
Definition: FGJSBBase.h:78
JSBSim::FGOutput::GetOutputName
std::string GetOutputName(unsigned int idx) const
Get the name identifier to which the output will be directed.
Definition: FGOutput.cpp:161
JSBSim::FGFDMExec::Holding
bool Holding(void)
Returns true if the simulation is Holding (i.e. simulation time is not moving).
Definition: FGFDMExec.h:490
JSBSim::FGFDMExec::GetWinds
FGWinds * GetWinds(void)
Returns the FGWinds pointer.
Definition: FGFDMExec.h:357
JSBSim::FGPropertyNode::GetDouble
double GetDouble(const std::string &name, double defaultValue=0.0) const
Get a double value for a property.
Definition: FGPropertyManager.cpp:203
JSBSim::FGScript
Encapsulates the JSBSim scripting capability.
Definition: FGScript.h:166
JSBSim::FGFDMExec::Unbind
void Unbind(void)
Unbind all tied JSBSim properties.
Definition: FGFDMExec.h:249
JSBSim::FGAtmosphere
Models an empty, abstract base atmosphere class.
Definition: FGAtmosphere.h:76
JSBSim::FGFDMExec::GetPropagate
FGPropagate * GetPropagate(void)
Returns the FGPropagate pointer.
Definition: FGFDMExec.h:377
JSBSim::FGFDMExec::ResetToInitialConditions
void ResetToInitialConditions(int mode)
Resets the initial conditions object and prepares the simulation to run again.
Definition: FGFDMExec.cpp:608
JSBSim::FGFDMExec::GetFDMCount
int GetFDMCount(void) const
Gets the number of child FDMs.
Definition: FGFDMExec.h:424
JSBSim::FGFDMExec::GetHoldDown
bool GetHoldDown(void) const
Gets the value of the property forces/hold-down.
Definition: FGFDMExec.h:609
JSBSim::FGFDMExec::EnableIncrementThenHold
void EnableIncrementThenHold(int Timesteps)
Turn on hold after increment.
Definition: FGFDMExec.h:484
JSBSim::FGFDMExec::GetMassBalance
FGMassBalance * GetMassBalance(void)
Returns the FGAircraft pointer.
Definition: FGFDMExec.h:363
JSBSim::FGFDMExec::GetOutputFileName
std::string GetOutputFileName(int n) const
Retrieves the current output filename.
Definition: FGFDMExec.h:464
JSBSim::FGPropagate
Models the EOM and integration/propagation of state.
Definition: FGPropagate.h:93
JSBSim::FGTrim
The trimming routine for JSBSim.
Definition: FGTrim.h:123
JSBSim::FGFDMExec::GetAerodynamics
FGAerodynamics * GetAerodynamics(void)
Returns the FGAerodynamics pointer.
Definition: FGFDMExec.h:365
JSBSim::FGInitialCondition
Initializes the simulation run.
Definition: FGInitialCondition.h:224
JSBSim::FGFDMExec::CheckIncrementalHold
void CheckIncrementalHold(void)
Checks if required to hold afer increment.
Definition: FGFDMExec.cpp:1137
JSBSim::FGFDMExec::GetDeltaT
double GetDeltaT(void) const
Returns the simulation delta T.
Definition: FGFDMExec.h:545
JSBSim::FGFDMExec::GetPropulsion
FGPropulsion * GetPropulsion(void)
Returns the FGPropulsion pointer.
Definition: FGFDMExec.h:361
JSBSim::FGPropertyManager::Unbind
void Unbind(void)
Unbind all properties bound by this manager to an external data source.
Definition: FGPropertyManager.cpp:54
JSBSim::FGFDMExec::GetFrame
unsigned int GetFrame(void) const
Retrieves the current frame count.
Definition: FGFDMExec.h:591
JSBSim::FGGroundReactions
Manages ground reactions modeling.
Definition: FGGroundReactions.h:79
JSBSim::FGFDMExec::GetFCS
FGFCS * GetFCS(void)
Returns the FGFCS pointer.
Definition: FGFDMExec.h:359
JSBSim::FGFDMExec::Hold
void Hold(void)
Pauses execution by preventing time from incrementing.
Definition: FGFDMExec.h:482
JSBSim::FGFDMExec::GetTrim
FGTrim * GetTrim(void)
Returns a pointer to the FGTrim object.
Definition: FGFDMExec.cpp:1128
JSBSim::FGFDMExec::EnableOutput
void EnableOutput(void)
Enables data logging to all outputs.
Definition: FGFDMExec.h:480
JSBSim::FGFDMExec::EnumerateFDMs
std::vector< std::string > EnumerateFDMs(void)
Returns a vector of strings representing the names of all loaded models (future)
Definition: FGFDMExec.cpp:642
JSBSim::FGOutput::Disable
void Disable(void)
Disables the output generation for all output instances.
Definition: FGOutput.h:182
JSBSim::FGTemplateFunc
Definition: FGTemplateFunc.h:56
JSBSim::FGAccelerations
Handles the calculation of accelerations.
Definition: FGAccelerations.h:95
JSBSim::FGAircraft
Encapsulates an Aircraft and its systems.
Definition: FGAircraft.h:102
JSBSim::FGOutput
Handles simulation output.
Definition: FGOutput.h:125
JSBSim::FGFDMExec::SetEnginePath
bool SetEnginePath(const SGPath &path)
Set the path to the engine config file directories.
Definition: FGFDMExec.h:311
JSBSim::FGFDMExec::GetEnginePath
const SGPath & GetEnginePath(void)
Retrieves the engine path.
Definition: FGFDMExec.h:393
JSBSim::FGFCS
Encapsulates the Flight Control System (FCS) functionality.
Definition: FGFCS.h:187
JSBSim::FGOutput::SetOutputName
bool SetOutputName(unsigned int idx, const std::string &name)
Overwrites the name identifier under which the output will be logged.
Definition: FGOutput.cpp:151
JSBSim::FGFDMExec::SetAircraftPath
bool SetAircraftPath(const SGPath &path)
Set the path to the aircraft config file directories.
Definition: FGFDMExec.h:323
JSBSim::FGFDMExec::RunIC
bool RunIC(void)
Initializes the sim from the initial condition object and executes each scheduled model without integ...
Definition: FGFDMExec.cpp:560
JSBSim::TrimFailureException
Definition: FGFDMExec.h:75
JSBSim::FGPropulsion
Propulsion management class.
Definition: FGPropulsion.h:99
JSBSim::FGFDMExec::FGFDMExec
FGFDMExec(FGPropertyManager *root=0, unsigned int *fdmctr=0)
Default constructor.
Definition: FGFDMExec.cpp:76
JSBSim::FGFDMExec::GetExternalReactions
FGExternalReactions * GetExternalReactions(void)
Returns the FGExternalReactions pointer.
Definition: FGFDMExec.h:371
JSBSim::FGFDMExec::GetOutputPath
const SGPath & GetOutputPath(void)
Retrieves the path to the output files.
Definition: FGFDMExec.h:401
JSBSim::FGFDMExec::GetDebugLevel
int GetDebugLevel(void) const
Retrieves the current debug level setting.
Definition: FGFDMExec.h:594
JSBSim::FGInertial
Models inertial forces (e.g.
Definition: FGInertial.h:65
JSBSim::FGFDMExec::Setdt
void Setdt(double delta_t)
Sets the integration time step for the simulation executive.
Definition: FGFDMExec.h:564
JSBSim::FGFDMExec::SetSystemsPath
bool SetSystemsPath(const SGPath &path)
Set the path to the systems config file directories.
Definition: FGFDMExec.h:334
JSBSim::FGFDMExec::SetChild
void SetChild(bool ch)
Marks this instance of the Exec object as a "child" object.
Definition: FGFDMExec.h:428
JSBSim::FGOutput::Enable
void Enable(void)
Enables the output generation for all output instances.
Definition: FGOutput.h:180
JSBSim::FGFDMExec::PropertyCatalogStructure::node
FGPropertyNode_ptr node
The node for the property.
Definition: FGFDMExec.h:509
JSBSim::FGFDMExec::Resume
void Resume(void)
Resumes execution from a "Hold".
Definition: FGFDMExec.h:488
JSBSim::FGPropertyNode::SetDouble
bool SetDouble(const std::string &name, double val)
Set a double value for a property.
Definition: FGPropertyManager.cpp:245
JSBSim::FGFDMExec::LoadModel
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:671
JSBSim::FGAuxiliary
Encapsulates various uncategorized scheduled functions.
Definition: FGAuxiliary.h:100
JSBSim::FGFDMExec::ForceOutput
void ForceOutput(int idx=0)
Forces the specified output object to print its items once.
Definition: FGFDMExec.h:449
JSBSim::FGFDMExec::GetFullAircraftPath
const SGPath & GetFullAircraftPath(void)
Retrieves the full aircraft path name.
Definition: FGFDMExec.h:399
JSBSim::FGFDMExec::Initialize
void Initialize(FGInitialCondition *FGIC)
Initializes the simulation with initial conditions.
Definition: FGFDMExec.cpp:599
JSBSim::FGFDMExec::GetAccelerations
FGAccelerations * GetAccelerations(void)
Returns the FGAccelerations pointer.
Definition: FGFDMExec.h:355
JSBSim::FGWinds
Models atmospheric disturbances: winds, gusts, turbulence, downbursts, etc.
Definition: FGWinds.h:166
JSBSim::FGFDMExec::GetBuoyantForces
FGBuoyantForces * GetBuoyantForces(void)
Returns the FGBuoyantForces pointer.
Definition: FGFDMExec.h:373
JSBSim::FGFDMExec::Run
bool Run(void)
This function executes each scheduled model in succession.
Definition: FGFDMExec.cpp:325
JSBSim::FGPropertyManager
Definition: FGPropertyManager.h:373
JSBSim::FGOutput::SetRateHz
void SetRateHz(double rate)
Modifies the output rate for all output instances.
Definition: FGOutput.cpp:135
JSBSim::FGFDMExec::GetPropertyValue
double GetPropertyValue(const std::string &property)
Retrieves the value of a property.
Definition: FGFDMExec.h:406
JSBSim::FGBuoyantForces
Encapsulates the Buoyant forces calculations.
Definition: FGBuoyantForces.h:98
JSBSim::FGFDMExec::DisableOutput
void DisableOutput(void)
Disables data logging to all outputs.
Definition: FGFDMExec.h:478
JSBSim::FGFDMExec::SetOutputPath
bool SetOutputPath(const SGPath &path)
Set the directory where the output files will be written.
Definition: FGFDMExec.h:345