]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/models/flight_control/FGFCSComponent.h
Andreas Gaeb: fix #222 (JSBSIm reset problems)
[flightgear.git] / src / FDM / JSBSim / models / flight_control / FGFCSComponent.h
index 8e0fa14f4b73e66177d42e94354f56e311b568b0..7889cd948a243b05ca40ee82381aef325bc915b9 100644 (file)
@@ -37,23 +37,15 @@ SENTRY
 INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-#ifdef FGFS
-#  include <simgear/compiler.h>
-#endif
-
+#include "FGJSBBase.h"
 #include <string>
 #include <vector>
-#include <FGJSBBase.h>
-#include <input_output/FGPropertyManager.h>
-#include <input_output/FGXMLElement.h>
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINITIONS
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-#define ID_FCSCOMPONENT "$Id$"
-
-using std::string;
+#define ID_FCSCOMPONENT "$Id: FGFCSComponent.h,v 1.17 2010/08/21 22:56:11 jberndt Exp $"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 FORWARD DECLARATIONS
@@ -62,6 +54,8 @@ FORWARD DECLARATIONS
 namespace JSBSim {
 
 class FGFCS;
+class FGPropertyManager;
+class Element;
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DOCUMENTATION
@@ -81,9 +75,12 @@ CLASS DOCUMENTATION
     - FGSensor
     - FGFCSFunction
     - FGPID
+    - FGAccelerometer
+    - FGGyro
+    - FGActuator
 
     @author Jon S. Berndt
-    @version $Id$
+    @version $Id: FGFCSComponent.h,v 1.17 2010/08/21 22:56:11 jberndt Exp $
     @see Documentation for the FGFCS class, and for the configuration file class
 */
 
@@ -101,30 +98,36 @@ public:
 
   virtual bool Run(void);
   virtual void SetOutput(void);
-  inline double GetOutput (void) const {return Output;}
-  inline FGPropertyManager* GetOutputNode(void) { return OutputNode; }
-  inline string GetName(void) const {return Name;}
-  inline string GetType(void) const { return Type; }
+  void LateBind(void);
+  double GetOutput (void) const {return Output;}
+  std::string GetName(void) const {return Name;}
+  std::string GetType(void) const { return Type; }
   virtual double GetOutputPct(void) const { return 0; }
 
 protected:
   FGFCS* fcs;
   FGPropertyManager* PropertyManager;
   FGPropertyManager* treenode;
-  FGPropertyManager* OutputNode;
+  std::vector <FGPropertyManager*> OutputNodes;
   FGPropertyManager* ClipMinPropertyNode;
   FGPropertyManager* ClipMaxPropertyNode;
-  vector <FGPropertyManager*> InputNodes;
-  vector <float> InputSigns;
-  string Type;
-  string Name;
+  std::vector <FGPropertyManager*> InputNodes;
+  std::vector <std::string> InputNames;
+  std::vector <float> InputSigns;
+  std::vector <double> output_array;
+  std::string Type;
+  std::string Name;
   double Input;
   double Output;
   double clipmax, clipmin;
+  int delay;
+  int index;
   float clipMinSign, clipMaxSign;
+  double dt;
   bool IsOutput;
   bool clip;
 
+  void Delay(void);
   void Clip(void);
   virtual void bind();
   virtual void Debug(int from);