#include "FGInitialCondition.h"
#include "FGPropertyManager.h"
+namespace JSBSim {
+
static const char *IdSrc = "$Id$";
static const char *IdHdr = ID_FDMEXEC;
CLASS IMPLEMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-void checkTied( FGPropertyManager *node ) {
+void checkTied ( FGPropertyManager *node )
+{
int N = node->nChildren();
string name;
- for(int i=0;i<N;i++) {
- if(node->getChild(i)->nChildren() ) {
+
+ for (int i=0; i<N; i++) {
+ if (node->getChild(i)->nChildren() ) {
checkTied( (FGPropertyManager*)node->getChild(i) );
- } else if( node->getChild(i)->isTied() ) {
- name=((FGPropertyManager*)node->getChild(i))->GetFullyQualifiedName();
+ } else if ( node->getChild(i)->isTied() ) {
+ name = ((FGPropertyManager*)node->getChild(i))->GetFullyQualifiedName();
cerr << name << " is tied" << endl;
}
}
}
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// Constructor
FGFDMExec::FGFDMExec(FGPropertyManager* root)
if (Error > 0) result = false;
IC = new FGInitialCondition(this);
- //Trim is allocated as needed by GetTrim()
-
// Schedule a model. The second arg (the integer) is the pass number. For
// instance, the atmosphere model gets executed every fifth pass it is called
// by the executive. Everything else here gets executed each pass.
+ // IC and Trim objects are NOT scheduled.
Schedule(Atmosphere, 1);
Schedule(FCS, 1);
Schedule(Position, 1);
Schedule(Auxiliary, 1);
Schedule(Output, 1);
- //IC and Trim are *not* scheduled objects
-
-
modelLoaded = false;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-bool FGFDMExec::DeAllocate(void) {
-
+bool FGFDMExec::DeAllocate(void)
+{
delete Atmosphere;
delete FCS;
delete Propulsion;
delete IC;
delete Trim;
-
-
FirstModel = 0L;
Error = 0;
State->Initialize(IC);
Run();
State->Resume();
+
return true;
}
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-bool FGFDMExec::LoadModel(string AircraftPath, string EnginePath, string model) {
- FGFDMExec::AircraftPath=AircraftPath;
- FGFDMExec::EnginePath=EnginePath;
+bool FGFDMExec::LoadModel(string AircraftPath, string EnginePath, string model)
+{
+ FGFDMExec::AircraftPath = AircraftPath;
+ FGFDMExec::EnginePath = EnginePath;
+
return LoadModel(model);
}
}
}
}
+}