diff --git a/src/FGFDMExec.cpp b/src/FGFDMExec.cpp index d078cfb8ad..6f3f138709 100644 --- a/src/FGFDMExec.cpp +++ b/src/FGFDMExec.cpp @@ -76,7 +76,7 @@ using namespace std; namespace JSBSim { -IDENT(IdSrc,"$Id: FGFDMExec.cpp,v 1.168 2015/01/31 14:56:21 bcoconni Exp $"); +IDENT(IdSrc,"$Id: FGFDMExec.cpp,v 1.169 2015/01/31 15:08:59 bcoconni Exp $"); IDENT(IdHdr,ID_FDMEXEC); /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -282,6 +282,7 @@ bool FGFDMExec::Allocate(void) Models[eInput] = new FGInput(this); Models[eAtmosphere] = new FGStandardAtmosphere(this); Models[eWinds] = new FGWinds(this); + Models[eMassBalance] = new FGMassBalance(this); Models[eAuxiliary] = new FGAuxiliary(this); Models[eSystems] = new FGFCS(this); Models[ePropulsion] = new FGPropulsion(this); @@ -289,7 +290,6 @@ bool FGFDMExec::Allocate(void) Models[eGroundReactions] = new FGGroundReactions(this); Models[eExternalReactions] = new FGExternalReactions(this); Models[eBuoyantForces] = new FGBuoyantForces(this); - Models[eMassBalance] = new FGMassBalance(this); Models[eAircraft] = new FGAircraft(this); Models[eAccelerations] = new FGAccelerations(this); Models[eOutput] = new FGOutput(this); @@ -299,6 +299,7 @@ bool FGFDMExec::Allocate(void) Inertial = (FGInertial*)Models[eInertial]; Atmosphere = (FGAtmosphere*)Models[eAtmosphere]; Winds = (FGWinds*)Models[eWinds]; + MassBalance = (FGMassBalance*)Models[eMassBalance]; Auxiliary = (FGAuxiliary*)Models[eAuxiliary]; FCS = (FGFCS*)Models[eSystems]; Propulsion = (FGPropulsion*)Models[ePropulsion]; @@ -306,7 +307,6 @@ bool FGFDMExec::Allocate(void) GroundReactions = (FGGroundReactions*)Models[eGroundReactions]; ExternalReactions = (FGExternalReactions*)Models[eExternalReactions]; BuoyantForces = (FGBuoyantForces*)Models[eBuoyantForces]; - MassBalance = (FGMassBalance*)Models[eMassBalance]; Aircraft = (FGAircraft*)Models[eAircraft]; Accelerations = (FGAccelerations*)Models[eAccelerations]; Output = (FGOutput*)Models[eOutput]; @@ -351,14 +351,6 @@ bool FGFDMExec::DeAllocate(void) //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -void FGFDMExec::Schedule(FGModel* model, int rate) -{ - model->SetRate(rate); - Models.push_back(model); -} - -//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - bool FGFDMExec::Run(void) { bool success=true; diff --git a/src/FGFDMExec.h b/src/FGFDMExec.h index b583602f98..8fa2e9308d 100644 --- a/src/FGFDMExec.h +++ b/src/FGFDMExec.h @@ -54,7 +54,7 @@ INCLUDES DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ -#define ID_FDMEXEC "$Id: FGFDMExec.h,v 1.93 2014/11/30 13:06:05 bcoconni Exp $" +#define ID_FDMEXEC "$Id: FGFDMExec.h,v 1.94 2015/01/31 15:08:59 bcoconni Exp $" /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FORWARD DECLARATIONS @@ -178,7 +178,7 @@ CLASS DOCUMENTATION property actually maps toa function call of DoTrim(). @author Jon S. Berndt - @version $Revision: 1.93 $ + @version $Revision: 1.94 $ */ /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -228,6 +228,7 @@ class FGFDMExec : public FGJSBBase eInertial, eAtmosphere, eWinds, + eMassBalance, eAuxiliary, eSystems, ePropulsion, @@ -235,7 +236,6 @@ class FGFDMExec : public FGJSBBase eGroundReactions, eExternalReactions, eBuoyantForces, - eMassBalance, eAircraft, eAccelerations, eOutput, @@ -244,19 +244,6 @@ class FGFDMExec : public FGJSBBase /** Unbind all tied JSBSim properties. */ void Unbind(void) {instance->Unbind();} - /** This routine places a model into the runlist at the specified rate. The - "rate" is not really a clock rate. It represents how many calls to the - FGFDMExec::Run() method must be made before the model is executed. A - value of 1 means that the model will be executed for each call to the - exec's Run() method. A value of 5 means that the model will only be - executed every 5th call to the exec's Run() method. Use of a rate other than - one is at this time not recommended. - @param model A pointer to the model being scheduled. - @param rate The rate at which to execute the model as described above. - Default is every frame (rate=1). - @return Currently returns 0 always. */ - void Schedule(FGModel* model, int rate=1); - /** This function executes each scheduled model in succession. @return true if successful, false if sim should be ended */ bool Run(void);