]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/models/flight_control/FGFCSComponent.h
sync with JSB JSBSim CVS
[flightgear.git] / src / FDM / JSBSim / models / flight_control / FGFCSComponent.h
index eb5bf1b9a1bbe3cfece87c752c2d8ce6658100ab..d79a2e66cc56dc63b50dcc32847db7b61990aa9a 100644 (file)
@@ -7,20 +7,20 @@
  ------------- Copyright (C)  -------------
 
  This program is free software; you can redistribute it and/or modify it under
- the terms of the GNU General Public License as published by the Free Software
+ the terms of the GNU Lesser General Public License as published by the Free Software
  Foundation; either version 2 of the License, or (at your option) any later
  version.
 
  This program is distributed in the hope that it will be useful, but WITHOUT
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+ FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
  details.
 
- You should have received a copy of the GNU General Public License along with
+ You should have received a copy of the GNU Lesser General Public License along with
  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
  Place - Suite 330, Boston, MA  02111-1307, USA.
 
- Further information about the GNU General Public License can also be found on
+ Further information about the GNU Lesser General Public License can also be found on
  the world wide web at http://www.gnu.org.
 
 HISTORY
@@ -37,23 +37,16 @@ SENTRY
 INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-#ifdef FGFS
-#  include <simgear/compiler.h>
-#endif
-
+#include "FGJSBBase.h"
+#include "math/FGPropertyValue.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.20 2011/06/16 03:39:38 jberndt Exp $"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 FORWARD DECLARATIONS
@@ -62,6 +55,8 @@ FORWARD DECLARATIONS
 namespace JSBSim {
 
 class FGFCS;
+class FGPropertyManager;
+class Element;
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DOCUMENTATION
@@ -69,7 +64,7 @@ CLASS DOCUMENTATION
 
 /** Base class for JSBSim Flight Control System Components.
     The Flight Control System (FCS) for JSBSim consists of the FCS container
-    class (see \URL[FGFCS]{FGFCS.html}), the FGFCSComponent base class, and the
+    class (see FGFCS), the FGFCSComponent base class, and the
     component classes from which can be constructed a string, or channel. See:
 
     - FGSwitch
@@ -78,10 +73,15 @@ CLASS DOCUMENTATION
     - FGFilter
     - FGDeadBand
     - FGSummer
-    - FGGradient
+    - FGSensor
+    - FGFCSFunction
+    - FGPID
+    - FGAccelerometer
+    - FGGyro
+    - FGActuator
 
     @author Jon S. Berndt
-    @version $Id$
+    @version $Id: FGFCSComponent.h,v 1.20 2011/06/16 03:39:38 jberndt Exp $
     @see Documentation for the FGFCS class, and for the configuration file class
 */
 
@@ -99,33 +99,38 @@ 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; }
+  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 <FGPropertyValue*> 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;
+  double delay_time;
+  unsigned int delay;
+  int index;
+  float clipMinSign, clipMaxSign;
+  double dt;
   bool IsOutput;
   bool clip;
 
+  void Delay(void);
   void Clip(void);
   virtual void bind();
-  FGPropertyManager* resolveSymbol(string token);
-
   virtual void Debug(int from);
 };