]> git.mxchange.org Git - flightgear.git/blob - src/FDM/JSBSim/filtersjb/FGFCSComponent.h
Tidy up the autoconf/automake configuration a bit.
[flightgear.git] / src / FDM / JSBSim / filtersjb / FGFCSComponent.h
1 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
3  Header:       FGFCSComponent.h
4  Author:       Jon S. Berndt
5  Date started: 05/01/2000
6
7  ------------- Copyright (C)  -------------
8
9  This program is free software; you can redistribute it and/or modify it under
10  the terms of the GNU General Public License as published by the Free Software
11  Foundation; either version 2 of the License, or (at your option) any later
12  version.
13
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 General Public License for more
17  details.
18
19  You should have received a copy of the GNU 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.
22
23  Further information about the GNU General Public License can also be found on
24  the world wide web at http://www.gnu.org.
25
26 HISTORY
27 --------------------------------------------------------------------------------
28
29 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
30 SENTRY
31 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
32
33 #ifndef FGFCSCOMPONENT_H
34 #define FGFCSCOMPONENT_H
35
36 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
37 INCLUDES
38 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
39
40 #ifdef FGFS
41 #  include <simgear/compiler.h>
42 #endif
43
44 #include <string>
45 #include "../FGJSBBase.h"
46 #include "../FGPropertyManager.h"
47
48
49 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
50 DEFINITIONS
51 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
52
53 #define ID_FCSCOMPONENT "$Id$"
54
55 using std::string;
56
57 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
58 FORWARD DECLARATIONS
59 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
60
61 class FGFCS;
62
63 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
64 COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
65 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
66
67 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
68 CLASS DOCUMENTATION
69 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
70
71 /** Base class for JSBSim Flight Control System Components.
72     The Flight Control System (FCS) for JSBSim consists of the FCS container
73     class (see \URL[FGFCS]{FGFCS.html}), the FGFCSComponent base class, and the
74     component classes from which can be constructed a string, or channel. See:
75     <ul>
76     <li>\URL[Switch Component]{FGSwitch.html}</li>
77     <li>\URL[Gain Component]{FGGain.html}</li>
78     <li>\URL[Flaps Component]{FGFlaps.html}</li>
79     <li>\URL[Filter Component]{FGFilter.html}</li>
80     <li>\URL[Deadband Component]{FGDeadBand.html}</li>
81     <li>\URL[Summer Component]{FGSummer.html}</li>
82     <li>\URL[Gradient Component]{FGGradient.html}</li>
83     </ul>
84     @author Jon S. Berndt
85     @version $Id$
86     @see Documentation for the FGFCS class, and for the configuration file class
87          FGConfigFile.
88 */
89
90 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
91 CLASS DECLARATION
92 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
93
94 class FGFCSComponent : public FGJSBBase
95 {
96 public:
97   /// Constructor
98   FGFCSComponent(FGFCS*);
99   /// Destructor
100   virtual ~FGFCSComponent();
101
102   virtual bool Run(void);
103   virtual void SetOutput(void);
104   inline double GetOutput (void) {return Output;}
105   inline FGPropertyManager* GetOutputNode(void) { return OutputNode; }
106   inline string GetName(void) {return Name;}
107   inline string GetType(void) { return Type; }
108   virtual double GetOutputPct(void) { return 0; }
109
110 protected:
111    /// Pilot/Aircraft, FCS, Autopilot inputs
112   enum eInputType {itPilotAC, itFCS, itAP, itBias} InputType;
113   FGFCS* fcs;
114   FGPropertyManager* PropertyManager;
115   string Type;
116   string Name;
117   int ID;
118   FGPropertyManager* InputNode;
119   int InputIdx;
120   double Input;
121   FGPropertyManager* OutputNode;
122   double Output;
123   bool IsOutput;
124   virtual void Debug(int from);
125 };
126
127 #include "../FGFCS.h"
128
129 #endif
130