]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGRocket.h
Fix stall widths for the "auxilliary" (reverse flow) stalls so they
[flightgear.git] / src / FDM / JSBSim / FGRocket.h
index 990bd31f56ab0c8614bd34e54553eee737a6e407..00befb0d415c4f981e658273d8fab86a55170868 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGRocket.h
  Author:       Jon S. Berndt
@@ -27,35 +27,117 @@ HISTORY
 --------------------------------------------------------------------------------
 09/12/2000  JSB  Created
 
-********************************************************************************
-COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
-
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGROCKET_H
 #define FGROCKET_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGEngine.h"
-
-/*******************************************************************************
+#include "FGConfigFile.h"
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+#define ID_ROCKET "$Id$"
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+FORWARD DECLARATIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+namespace JSBSim {
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DOCUMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+/** Models a generic rocket engine.
+    The rocket engine is modeled given the following parameters:
+    <ul>
+        <li>Chamber pressure (in psf)</li>
+        <li>Specific heat ratio (usually about 1.2 for hydrocarbon fuel and LOX)</li>
+        <li>Propulsive efficiency (in percent, from 0 to 1.0)</li>
+        <li>Variance (in percent, from 0 to 1.0, nominally 0.05)</li>
+    </ul>
+    Additionally, the following control inputs, operating characteristics, and
+    location are required, as with all other engine types:
+    <ul>
+        <li>Throttle setting (in percent, from 0 to 1.0)</li>
+        <li>Maximum allowable throttle setting</li>
+        <li>Minimum working throttle setting</li>
+        <li>Sea level fuel flow at maximum thrust</li>
+        <li>Sea level oxidizer flow at maximum thrust</li>
+        <li>X, Y, Z location in structural coordinate frame</li>
+        <li>Pitch and Yaw</li>
+    </ul>
+    The nozzle exit pressure (p2) is returned via a
+    call to FGNozzle::GetPowerRequired(). This exit pressure is used,
+    along with chamber pressure and specific heat ratio, to get the
+    thrust coefficient for the throttle setting. This thrust
+    coefficient is multiplied by the chamber pressure and then passed
+    to the nozzle Calculate() routine, where the thrust force is
+    determined.
+
+    @author Jon S. Berndt
+    $Id$
+    @see FGNozzle,
+    FGThruster,
+    FGForce,
+    FGEngine,
+    FGPropulsion,
+    FGTank
+*/
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGRocket : public FGEngine
 {
-
 public:
-  FGRocket();
-  ~FGRocket();
-
+  /** Constructor.
+      @param exec pointer to JSBSim parent object, the FDM Executive.
+      @param Eng_cfg pointer to the config file object.
+      @param engine_number engine number */
+  FGRocket(FGFDMExec* exec, FGConfigFile* Eng_cfg, int engine_number);
+
+  /** Destructor */
+  ~FGRocket(void);
+
+  /** Determines the thrust coefficient.
+      @return thrust coefficient times chamber pressure */
+  double Calculate(void);
+
+  /** Gets the chamber pressure.
+      @return chamber pressure in psf. */
+  double GetChamberPressure(void) {return PC;}
+
+  /** Gets the flame-out status.
+      The engine will "flame out" if the throttle is set below the minimum
+      sustainable setting.
+      @return true if engine has flamed out. */
+  bool GetFlameout(void) {return Flameout;}
+  string GetEngineLabels(string delimeter);
+  string GetEngineValues(string delimeter);
+
+private:
+  double SHR;
+  double maxPC;
+  double propEff;
+  double kFactor;
+  double Variance;
+  double PC;
+  bool Flameout;
+
+  void Debug(int from);
 };
-
-/******************************************************************************/
+}
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
+