]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGFDMExec.h
FG_HAVE_STD_INCLUDES -> SG_HAVE_STD_INCLUDES
[flightgear.git] / src / FDM / JSBSim / FGFDMExec.h
index 98acb5c43d12a756b01c023bb12e22df1f992298..7d36c4027174ee4d907abe0cd42a5ec834f65bb6 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGFDMExec.h
  Author:       Jon Berndt
 HISTORY
 --------------------------------------------------------------------------------
 11/17/98   JSB   Created
+7/31/99     TP   Added RunIC function that runs the sim so that every frame
+                 begins with the IC values from the given FGInitialCondition 
+                                  object and dt=0. 
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGFDMEXEC_HEADER_H
 #define FGFDMEXEC_HEADER_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-#include "FGModel.h"
+#define ID_FDMEXEC "$Header"
 
-using namespace std;
+#include "FGModel.h"
+#include "FGInitialCondition.h"
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGState;
 class FGAtmosphere;
@@ -55,21 +59,30 @@ class FGRotation;
 class FGPosition;
 class FGAuxiliary;
 class FGOutput;
+class FGInitialCondition;
 
 class FGFDMExec
 {
 public:
-  FGFDMExec::FGFDMExec(void);
-  FGFDMExec::~FGFDMExec(void);
+  FGFDMExec(void);
+  ~FGFDMExec(void);
 
   FGModel* FirstModel;
 
   bool Initialize(void);
   int  Schedule(FGModel* model, int rate);
   bool Run(void);
+  bool RunIC(FGInitialCondition *fgic);
   void Freeze(void) {frozen = true;}
   void Resume(void) {frozen = false;}
 
+  bool SetEnginePath(string path)   {EnginePath = path;}
+  bool SetAircraftPath(string path) {AircraftPath = path;}
+  bool SetScriptPath(string path)   {ScriptPath = path;}
+
+  bool LoadModel(string AircraftPath, string EnginePath, string model);
+  bool RunScript(string script);
+
   inline FGState* GetState(void)             {return State;}
   inline FGAtmosphere* GetAtmosphere(void)   {return Atmosphere;}
   inline FGFCS* GetFCS(void)                 {return FCS;}
@@ -79,11 +92,18 @@ public:
   inline FGPosition* GetPosition(void)       {return Position;}
   inline FGAuxiliary* GetAuxiliary(void)     {return Auxiliary;}
   inline FGOutput* GetOutput(void)           {return Output;}
+  inline string GetEnginePath(void)          {return EnginePath;}
+  inline string GetAircraftPath(void)        {return AircraftPath;}
 
 private:
   bool frozen;
   bool terminate;
   int Error;
+  bool modelLoaded;
+
+  string AircraftPath;
+  string EnginePath;
+  string ScriptPath;
 
   FGState*       State;
   FGAtmosphere*  Atmosphere;
@@ -94,9 +114,12 @@ private:
   FGPosition*    Position;
   FGAuxiliary*   Auxiliary;
   FGOutput*      Output;
+  
+  bool Allocate(void);
+  bool DeAllocate(void);
 
 protected:
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif