1 /*******************************************************************************
7 ------------- Copyright (C) 1999 Jon S. Berndt (jsb@hal-pc.org) -------------
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
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
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.
23 Further information about the GNU General Public License can also be found on
24 the world wide web at http://www.gnu.org.
27 --------------------------------------------------------------------------------
30 ********************************************************************************
32 *******************************************************************************/
37 /*******************************************************************************
39 *******************************************************************************/
42 # include <simgear/compiler.h>
45 # ifdef FG_HAVE_STD_INCLUDES
55 #include "filtersjb/FGFCSComponent.h"
57 #include "FGConfigFile.h"
60 /*******************************************************************************
62 *******************************************************************************/
66 class FGFCS : public FGModel
69 float DaCmd, DeCmd, DrCmd, DfCmd, DsbCmd, DspCmd;
70 float DaPos, DePos, DrPos, DfPos, DsbPos, DspPos;
71 float ThrottleCmd[MAX_ENGINES];
72 float ThrottlePos[MAX_ENGINES];
74 vector <FGFCSComponent*> Components;
82 inline float GetDaCmd(void) {return DaCmd;}
83 inline float GetDeCmd(void) {return DeCmd;}
84 inline float GetDrCmd(void) {return DrCmd;}
85 inline float GetDfCmd(void) {return DfCmd;}
86 inline float GetDsbCmd(void) {return DsbCmd;}
87 inline float GetDspCmd(void) {return DspCmd;}
88 inline float GetThrottleCmd(int ii) {return ThrottleCmd[ii];}
90 inline float GetDaPos(void) {return DaPos;}
91 inline float GetDePos(void) {return DePos;}
92 inline float GetDrPos(void) {return DrPos;}
93 inline float GetDfPos(void) {return DfPos;}
94 inline float GetDsbPos(void) {return DsbPos;}
95 inline float GetDspPos(void) {return DspPos;}
96 inline float GetThrottlePos(int ii) {return ThrottlePos[ii];}
98 inline FGState* GetState(void) {return State;}
99 float GetComponentOutput(int idx);
100 string GetComponentName(int idx);
102 inline void SetDaCmd(float tt) {DaCmd = tt;}
103 inline void SetDeCmd(float tt) {DeCmd = tt;}
104 inline void SetDrCmd(float tt) {DrCmd = tt;}
105 inline void SetDfCmd(float tt) {DfCmd = tt;}
106 inline void SetDsbCmd(float tt) {DsbCmd = tt;}
107 inline void SetDspCmd(float tt) {DspCmd = tt;}
108 void SetThrottleCmd(int ii, float tt);
110 inline void SetDaPos(float tt) {DaPos = tt;}
111 inline void SetDePos(float tt) {DePos = tt;}
112 inline void SetDrPos(float tt) {DrPos = tt;}
113 inline void SetDfPos(float tt) {DfPos = tt;}
114 inline void SetDsbPos(float tt) {DsbPos = tt;}
115 inline void SetDspPos(float tt) {DspPos = tt;}
116 void SetThrottlePos(int ii, float tt);
118 bool LoadFCS(FGConfigFile* AC_cfg);