-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Header: FGFDMExec.h
Author: Jon Berndt
begins with the IC values from the given FGInitialCondition
object and dt=0.
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#ifndef FGFDMEXEC_HEADER_H
#define FGFDMEXEC_HEADER_H
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+#define ID_FDMEXEC "$Header"
#include "FGModel.h"
#include "FGInitialCondition.h"
-using namespace std;
-
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
class FGState;
class FGAtmosphere;
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);
+ 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;}
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;
FGPosition* Position;
FGAuxiliary* Auxiliary;
FGOutput* Output;
+
+ bool Allocate(void);
+ bool DeAllocate(void);
protected:
};
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif