/** Encapsulates the JSBSim simulation executive.
@author Jon S. Berndt
@version $Id$
+ @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGFDMExec.h?rev=HEAD&content-type=text/vnd.viewcvs-markup">
+ Header File </a>
+ @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGFDMExec.cpp?rev=HEAD&content-type=text/vnd.viewcvs-markup">
+ Source File </a>
@doc This class is the interface class through which all other simulation classes
are instantiated, initialized, and run. When integrated with FlightGear (or
{
public:
-
/// Default constructor
FGFDMExec(FGPropertyManager* root = 0);
inline string GetAircraftPath(void) {return AircraftPath;}
FGPropertyManager* GetPropertyManager(void);
-
+ vector <string> EnumerateFDMs(void);
+ void SetSlave(void) {IsSlave = true;}
+
private:
FGModel* FirstModel;
unsigned int IdFDM;
static unsigned int FDMctr;
bool modelLoaded;
-
- FGPropertyManager *master;
+ bool IsSlave;
+ static FGPropertyManager *master;
FGPropertyManager *instance;
+
+ struct slaveData {
+ FGFDMExec* exec;
+ string info;
+ double x, y, z;
+ double roll, pitch, yaw;
+ bool mated;
+
+ slaveData(void) {
+ info = "";
+ x = y = z = 0.0;
+ roll = pitch = yaw = 0.0;
+ mated = true;
+ }
+
+ ~slaveData(void) {
+ delete exec;
+ }
+ };
string AircraftPath;
string EnginePath;
FGAuxiliary* Auxiliary;
FGOutput* Output;
+ vector <slaveData*> SlaveFDMList;
+
bool ReadMetrics(FGConfigFile*);
+ bool ReadSlave(FGConfigFile*);
bool ReadPropulsion(FGConfigFile*);
bool ReadFlightControls(FGConfigFile*);
bool ReadAerodynamics(FGConfigFile*);