]> git.mxchange.org Git - flightgear.git/blob - src/FDM/JSBSim/filtersjb/FGFCSComponent.h
Latest JSBSim changes.
[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
47 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
48 DEFINITIONS
49 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
50
51 #define ID_FCSCOMPONENT "$Id$"
52
53 using std::string;
54
55 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
56 FORWARD DECLARATIONS
57 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
58
59 class FGFCS;
60
61 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
62 COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
63 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
64
65 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
66 CLASS DOCUMENTATION
67 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
68
69 /** Base class for JSBSim Flight Control System Components.
70     The Flight Control System (FCS) for JSBSim consists of the FCS container
71     class (see \URL[FGFCS]{FGFCS.html}), the FGFCSComponent base class, and the
72     component classes from which can be constructed a string, or channel. See:
73     <ul>
74     <li>\URL[Switch Component]{FGSwitch.html}</li>
75     <li>\URL[Gain Component]{FGGain.html}</li>
76     <li>\URL[Flaps Component]{FGFlaps.html}</li>
77     <li>\URL[Filter Component]{FGFilter.html}</li>
78     <li>\URL[Deadband Component]{FGDeadBand.html}</li>
79     <li>\URL[Summer Component]{FGSummer.html}</li>
80     <li>\URL[Gradient Component]{FGGradient.html}</li>
81     </ul>
82     @author Jon S. Berndt
83     @version $Id$
84     @see Documentation for the FGFCS class, and for the configuration file class
85          FGConfigFile.
86 */
87
88 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
89 CLASS DECLARATION
90 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
91
92 class FGFCSComponent : public FGJSBBase
93 {
94 public:
95   /// Constructor
96   FGFCSComponent(FGFCS*);
97   /// Destructor
98   virtual ~FGFCSComponent();
99
100   virtual bool Run(void);
101   virtual void SetOutput(void);
102   inline double GetOutput (void) {return Output;}
103   inline string GetName(void) {return Name;}
104
105 protected:
106    /// Pilot/Aircraft, FCS, Autopilot inputs
107   enum eInputType {itPilotAC, itFCS, itAP, itBias} InputType;
108   FGFCS* fcs;
109   string Type;
110   string Name;
111   int ID;
112   eParam InputIdx;
113   double Input;
114   string sOutputIdx;
115   eParam OutputIdx;
116   double Output;
117   bool IsOutput;
118   virtual void Debug(int from);
119 };
120
121 #include "../FGFCS.h"
122
123 #endif
124