]> git.mxchange.org Git - flightgear.git/blob - src/FDM/JSBSim/FGFactorGroup.h
Fixes for IA-64 with Intel compiler.
[flightgear.git] / src / FDM / JSBSim / FGFactorGroup.h
1 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
3  Header:       FGFactorGroup.h
4  Author:       Tony Peden
5  Date started: 7/14/01
6
7  ------------- Copyright (C) 2001  Tony Peden (apeden@earthlink.net ------------
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 12/28/98   JSB   Created
29
30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
31 SENTRY
32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
33
34 #ifndef FGFACTORGROUP_H
35 #define FGFACTORGROUP_H
36
37 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
38 INCLUDES
39 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
40
41 #ifdef FGFS
42 #  include <simgear/compiler.h>
43 #endif
44
45 #include <vector>
46 #include <string>
47 #include "FGConfigFile.h"
48 #include "FGTable.h"
49 #include "FGCoefficient.h"
50 #include "FGAerodynamics.h"
51 #include "FGFactorGroup.h"
52
53 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54 DEFINITIONS
55 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
56
57 #define ID_FACTORGROUP "$Id$"
58
59 using std::vector;
60
61 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
62 FORWARD DECLARATIONS
63 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
64
65 class FGFDMExec;
66 class FGState;
67 class FGAtmosphere;
68 class FGFCS;
69 class FGAircraft;
70 class FGTranslation;
71 class FGRotation;
72 class FGPosition;
73 class FGAuxiliary;
74 class FGOutput;
75
76 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
77 COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
78 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
79
80
81 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
82 CLASS DOCUMENTATION
83 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
84
85 /** This class encapsulates the functionality needed to manage a factor group
86     i.e. factor*(coeff1 + coeff2 + coeff3)
87     @author Tony Peden
88     @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGFactorGroup.h?rev=HEAD&content-type=text/vnd.viewcvs-markup">
89          Header File </a>
90     @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGFactorGroup.cpp?rev=HEAD&content-type=text/vnd.viewcvs-markup">
91          Source File </a>
92 */
93
94 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
95 CLASS DECLARATION
96 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
97
98 class FGFactorGroup: public FGCoefficient
99 {
100 public:
101   FGFactorGroup(FGFDMExec* fdmex);
102   ~FGFactorGroup();
103   
104   bool Load(FGConfigFile *AC_cfg);
105   double TotalValue(void);
106   inline double GetValue(void) const { return totalValue; }
107   inline double GetSD(void) { return SDtotal; }
108   inline double GetFactorSD(void) { return FGCoefficient::GetSD(); }
109   
110   void bind(FGPropertyManager* parent);
111   void unbind(void);
112
113 private:
114   typedef vector<FGCoefficient*> CoeffArray;
115   CoeffArray sum;
116   double SDtotal;
117   double totalValue;
118   string description;
119   string name;
120   FGPropertyManager *node;
121   void Debug(int from);
122 };
123     
124 #endif