]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/models/FGGroundReactions.h
Merge branch 'next' into durk-atc
[flightgear.git] / src / FDM / JSBSim / models / FGGroundReactions.h
index 2a1b8e2424ebb08899b681b2c09164d01e244914..30792225ded793bda7357c02761d737dfedfa49f 100644 (file)
@@ -4,7 +4,7 @@
  Author:       Jon S. Berndt
  Date started: 09/13/00
 
- ------------- Copyright (C) 1999  Jon S. Berndt (jsb@hal-pc.org) -------------
+ ------------- Copyright (C) 1999  Jon S. Berndt (jon@jsbsim.org) -------------
 
  This program is free software; you can redistribute it and/or modify it under
  the terms of the GNU Lesser General Public License as published by the Free Software
@@ -38,23 +38,14 @@ SENTRY
 INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-#ifdef FGFS
-#  include <simgear/compiler.h>
-#  ifdef SG_HAVE_STD_INCLUDES
-#    include <vector>
-#  else
-#    include <vector.h>
-#  endif
-#else
-#  include <vector>
-#endif
+#include <vector>
 
 #include "FGModel.h"
 #include "FGLGear.h"
-#include <math/FGColumnVector3.h>
-#include <input_output/FGXMLElement.h>
+#include "math/FGColumnVector3.h"
+#include "input_output/FGXMLElement.h"
 
-#define ID_GROUNDREACTIONS "$Id$"
+#define ID_GROUNDREACTIONS "$Id: FGGroundReactions.h,v 1.19 2010/11/18 12:38:06 jberndt Exp $"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 FORWARD DECLARATIONS
@@ -87,6 +78,19 @@ 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:
@@ -96,20 +100,21 @@ public:
   bool InitModel(void);
   bool Run(void);
   bool Load(Element* el);
-  FGColumnVector3& GetForces(void) {return vForces;}
+  const FGColumnVector3& GetForces(void) const {return vForces;}
   double GetForces(int idx) const {return vForces(idx);}
-  FGColumnVector3& GetMoments(void) {return vMoments;}
+  const FGColumnVector3& GetMoments(void) const {return vMoments;}
   double GetMoments(int idx) const {return vMoments(idx);}
-  string GetGroundReactionStrings(string delimeter);
-  string GetGroundReactionValues(string delimeter);
-  bool GetWOW(void);
+  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(); }
 
   /** Gets a gear instance
       @param gear index of gear instance
       @return a pointer to the FGLGear instance of the gear unit requested */
-  inline FGLGear* GetGearUnit(int gear) { return lGear[gear]; }
+  FGLGear* GetGearUnit(int gear) const { return lGear[gear]; }
 
 private:
   vector <FGLGear*> lGear;