X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2FJSBSim%2Fmodels%2FFGGroundReactions.h;h=5774918ad3a005927f2442fac911f09069d10440;hb=1575fad886a0b18825363d41d53a287e8d36b9c8;hp=30792225ded793bda7357c02761d737dfedfa49f;hpb=ad51a9bde2995605984161af1b4273b28ce4fddc;p=flightgear.git diff --git a/src/FDM/JSBSim/models/FGGroundReactions.h b/src/FDM/JSBSim/models/FGGroundReactions.h index 30792225d..5774918ad 100644 --- a/src/FDM/JSBSim/models/FGGroundReactions.h +++ b/src/FDM/JSBSim/models/FGGroundReactions.h @@ -45,7 +45,7 @@ INCLUDES #include "math/FGColumnVector3.h" #include "input_output/FGXMLElement.h" -#define ID_GROUNDREACTIONS "$Id: FGGroundReactions.h,v 1.19 2010/11/18 12:38:06 jberndt Exp $" +#define ID_GROUNDREACTIONS "$Id: FGGroundReactions.h,v 1.24 2011/08/21 15:13:22 bcoconni Exp $" /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FORWARD DECLARATIONS @@ -78,19 +78,6 @@ CLASS DOCUMENTATION CLASS DECLARATION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ -class MultiplierIterator -{ -public: - MultiplierIterator(FGGroundReactions* GndReactions); - MultiplierIterator& operator++(); - FGPropagate::LagrangeMultiplier* operator*() { return multiplier; } -private: - FGGroundReactions* GroundReactions; - FGPropagate::LagrangeMultiplier* multiplier; - int gearNum; - int entry; -}; - class FGGroundReactions : public FGModel { public: @@ -98,7 +85,14 @@ public: ~FGGroundReactions(void); bool InitModel(void); - bool Run(void); + /** Runs the Ground Reactions model; called by the Executive + Can pass in a value indicating if the executive is directing the simulation to Hold. + @param Holding if true, the executive has been directed to hold the sim from + advancing time. Some models may ignore this flag, such as the Input + model, which may need to be active to listen on a socket for the + "Resume" command to be given. + @return false if no error */ + bool Run(bool Holding); bool Load(Element* el); const FGColumnVector3& GetForces(void) const {return vForces;} double GetForces(int idx) const {return vForces(idx);} @@ -107,7 +101,6 @@ public: string GetGroundReactionStrings(string delimeter) const; string GetGroundReactionValues(string delimeter) const; bool GetWOW(void) const; - void UpdateForcesAndMoments(void); int GetNumGearUnits(void) const { return (int)lGear.size(); } @@ -116,10 +109,16 @@ public: @return a pointer to the FGLGear instance of the gear unit requested */ FGLGear* GetGearUnit(int gear) const { return lGear[gear]; } + void RegisterLagrangeMultiplier(LagrangeMultiplier* lmult) { multipliers.push_back(lmult); } + vector * GetMultipliersList(void) { return &multipliers; } + + FGLGear::Inputs in; + private: vector lGear; FGColumnVector3 vForces; FGColumnVector3 vMoments; + vector multipliers; void bind(void); void Debug(int from);