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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
40 #include "FGJSBBase.h"
41 #include "math/FGParameter.h"
45 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
47 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
49 #define ID_FCSCOMPONENT "$Id: FGFCSComponent.h,v 1.18 2011/04/05 20:20:21 andgi Exp $"
51 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
58 class FGPropertyManager;
61 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
63 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
65 /** Base class for JSBSim Flight Control System Components.
66 The Flight Control System (FCS) for JSBSim consists of the FCS container
67 class (see FGFCS), the FGFCSComponent base class, and the
68 component classes from which can be constructed a string, or channel. See:
84 @version $Id: FGFCSComponent.h,v 1.18 2011/04/05 20:20:21 andgi Exp $
85 @see Documentation for the FGFCS class, and for the configuration file class
88 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
90 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
92 class FGFCSComponent : public FGJSBBase
96 FGFCSComponent(FGFCS* fcs, Element* el);
98 virtual ~FGFCSComponent();
100 virtual bool Run(void);
101 virtual void SetOutput(void);
102 double GetOutput (void) const {return Output;}
103 std::string GetName(void) const {return Name;}
104 std::string GetType(void) const { return Type; }
105 virtual double GetOutputPct(void) const { return 0; }
109 FGPropertyManager* PropertyManager;
110 FGPropertyManager* treenode;
111 std::vector <FGPropertyManager*> OutputNodes;
112 FGPropertyManager* ClipMinPropertyNode;
113 FGPropertyManager* ClipMaxPropertyNode;
114 std::vector <FGParameter*> InputNodes;
115 std::vector <std::string> InputNames;
116 std::vector <float> InputSigns;
117 std::vector <double> output_array;
122 double clipmax, clipmin;
125 float clipMinSign, clipMaxSign;
133 virtual void Debug(int from);
138 #include "../FGFCS.h"