]> git.mxchange.org Git - flightgear.git/blob - src/FDM/JSBSim/FGRocket.h
b) FDM - ada.cxx, ada.hxx have been updated with the faux, daux and iaux arrays that...
[flightgear.git] / src / FDM / JSBSim / FGRocket.h
1 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2
3  Header:       FGRocket.h
4  Author:       Jon S. Berndt
5  Date started: 09/12/2000
6
7  ------------- Copyright (C) 2000  Jon S. Berndt (jsb@hal-pc.org) --------------
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 09/12/2000  JSB  Created
29
30 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
31 SENTRY
32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
33
34 #ifndef FGROCKET_H
35 #define FGROCKET_H
36
37 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
38 INCLUDES
39 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
40
41 #include "FGEngine.h"
42 #include "FGConfigFile.h"
43
44 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
45 DEFINITIONS
46 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
47
48 #define ID_ROCKET "$Id$"
49
50 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
51 FORWARD DECLARATIONS
52 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
53
54 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
55 COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
56 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
57
58 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
59 CLASS DOCUMENTATION
60 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
61
62 /** Models a generic rocket engine.
63     The rocket engine is modeled given the following parameters:
64     <ul>
65         <li>Chamber pressure (in psf)</li>
66         <li>Specific heat ratio (usually about 1.2 for hydrocarbon fuel and LOX)</li>
67         <li>Propulsive efficiency (in percent, from 0 to 1.0)</li>
68         <li>Variance (in percent, from 0 to 1.0, nominally 0.05)</li>
69     </ul>
70     Additionally, the following control inputs, operating characteristics, and
71     location are required, as with all other engine types:</font>
72     <ul>
73         <li>Throttle setting (in percent, from 0 to 1.0)</font></li>
74         <li>Maximum allowable throttle setting</li>
75         <li>Minimum working throttle setting</li>
76         <li>Sea level fuel flow at maximum thrust</li>
77         <li>Sea level oxidizer flow at maximum thrust</li>
78         <li>X, Y, Z location in structural coordinate frame</li>
79         <li>Pitch and Yaw</li>
80     </ul>
81     The nozzle exit pressure (p2) is returned via a
82     call to FGNozzle::GetPowerRequired(). This exit pressure is used,
83     along with chamber pressure and specific heat ratio, to get the
84     thrust coefficient for the throttle setting. This thrust
85     coefficient is multiplied by the chamber pressure and then passed
86     to the nozzle Calculate() routine, where the thrust force is
87     determined.
88
89     @author Jon S. Berndt
90     @version $Id$
91     @see FGNozzle
92     @see FGThruster
93     @see FGForce
94     @see FGEngine
95     @see FGPropulsion
96     @see FGTank
97 */
98
99 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
100 CLASS DECLARATION
101 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
102
103 class FGRocket : public FGEngine
104 {
105 public:
106   /** Constructor.
107       @param exec pointer to JSBSim parent object, the FDM Executive.
108       @param Eng_cfg pointer to the config file object. */
109   FGRocket(FGFDMExec* exec, FGConfigFile* Eng_cfg);
110
111   /** Destructor */
112   ~FGRocket();
113
114   /** Determines the thrust coefficient.
115       This routine takes the nozzle exit pressure and calculates the thrust
116       coefficient times the chamber pressure.
117       @param pe nozzle exit pressure
118       @return thrust coefficient times chamber pressure */
119   float Calculate(float pe);
120   
121   /** Gets the chamber pressure.
122       @return chamber pressure in psf. */
123   float GetChamberPressure(void) {return PC;}
124
125 private:
126   float SHR;
127   float maxPC;
128   float propEff;
129   float kFactor;
130   float Variance;
131   float PC;
132   void Debug(void);
133 };
134
135 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
136 #endif
137