1 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 Header: FGFCSComponent.h
5 Date started: 05/01/2000
7 ------------- Copyright (C) -------------
9 This program is free software; you can redistribute it and/or modify it under
10 the terms of the GNU Lesser General Public License as published by the Free Software
11 Foundation; either version 2 of the License, or (at your option) any later
14 This program is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
19 You should have received a copy of the GNU Lesser General Public License along with
20 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21 Place - Suite 330, Boston, MA 02111-1307, USA.
23 Further information about the GNU Lesser General Public License can also be found on
24 the world wide web at http://www.gnu.org.
27 --------------------------------------------------------------------------------
29 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
31 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
33 #ifndef FGFCSCOMPONENT_H
34 #define FGFCSCOMPONENT_H
36 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
38 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
41 # include <simgear/compiler.h>
46 #include <FGJSBBase.h>
47 #include <input_output/FGPropertyManager.h>
48 #include <input_output/FGXMLElement.h>
50 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
52 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
54 #define ID_FCSCOMPONENT "$Id$"
58 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
60 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
66 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
68 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
70 /** Base class for JSBSim Flight Control System Components.
71 The Flight Control System (FCS) for JSBSim consists of the FCS container
72 class (see FGFCS), the FGFCSComponent base class, and the
73 component classes from which can be constructed a string, or channel. See:
87 @see Documentation for the FGFCS class, and for the configuration file class
90 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
92 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
94 class FGFCSComponent : public FGJSBBase
98 FGFCSComponent(FGFCS* fcs, Element* el);
100 virtual ~FGFCSComponent();
102 virtual bool Run(void);
103 virtual void SetOutput(void);
104 inline double GetOutput (void) const {return Output;}
105 inline FGPropertyManager* GetOutputNode(void) { return OutputNode; }
106 inline string GetName(void) const {return Name;}
107 inline string GetType(void) const { return Type; }
108 virtual double GetOutputPct(void) const { return 0; }
112 FGPropertyManager* PropertyManager;
113 FGPropertyManager* treenode;
114 FGPropertyManager* OutputNode;
115 FGPropertyManager* ClipMinPropertyNode;
116 FGPropertyManager* ClipMaxPropertyNode;
117 vector <FGPropertyManager*> InputNodes;
118 vector <float> InputSigns;
123 double clipmax, clipmin;
124 float clipMinSign, clipMaxSign;
130 virtual void Debug(int from);
135 #include "../FGFCS.h"