]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/models/propulsion/FGRocket.h
Andreas Gaeb: fix #222 (JSBSIm reset problems)
[flightgear.git] / src / FDM / JSBSim / models / propulsion / FGRocket.h
index 4e6e8120a5af3a49e4b07ce2eb1b9ef53f1fe858..38e367510645e7f88ef94e907ef7c5de00198ccc 100644 (file)
@@ -39,14 +39,14 @@ INCLUDES
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGEngine.h"
-#include <math/FGTable.h>
-#include <input_output/FGXMLElement.h>
+#include "math/FGTable.h"
+#include "input_output/FGXMLElement.h"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 DEFINITIONS
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
-#define ID_ROCKET "$Id$"
+#define ID_ROCKET "$Id: FGRocket.h,v 1.14 2010/08/21 18:08:25 jberndt Exp $"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 FORWARD DECLARATIONS
@@ -118,7 +118,7 @@ for the rocket engine to be throttle up to 1. At that time, the solid rocket
 fuel begins burning and thrust is provided.
 
     @author Jon S. Berndt
-    $Id$
+    $Id: FGRocket.h,v 1.14 2010/08/21 18:08:25 jberndt Exp $
     @see FGNozzle,
     FGThruster,
     FGForce,
@@ -143,9 +143,8 @@ public:
   /** Destructor */
   ~FGRocket(void);
 
-  /** Determines the thrust.
-      @return thrust */
-  double Calculate(void);
+  /** Determines the thrust.*/
+  void Calculate(void);
 
   /** Gets the total impulse of the rocket.
       @return The cumulative total impulse of the rocket up to this time.*/
@@ -159,8 +158,34 @@ public:
 
   double GetOxiFlowRate(void) const {return OxidizerFlowRate;}
 
-  string GetEngineLabels(string delimeter);
-  string GetEngineValues(string delimeter);
+  std::string GetEngineLabels(const std::string& delimiter);
+  std::string GetEngineValues(const std::string& delimiter);
+
+  /** Sets the thrust variation for a solid rocket engine. 
+      Solid propellant rocket motor thrust characteristics are typically
+      defined at 70 degrees F temperature. At any other temperature,
+      performance will be different. Warmer propellant grain will
+      burn quicker and at higher thrust.  Total motor impulse is
+      not changed for change in thrust.
+      @param var the variation in percent. That is, a 2 percent
+      variation would be specified as 0.02. A positive 2% variation
+      in thrust would increase the thrust by 2%, and shorten the burn time. */
+  void SetThrustVariation(double var) {ThrustVariation = var;}
+
+  /** Sets the variation in total motor energy.
+      The total energy present in a solid rocket motor can be modified
+      (such as might happen with manufacturing variations) by setting
+      the total Isp variation. 
+      @param var the variation in percent. That is, a 2 percent
+      variation would be specified as 0.02. This variation will 
+      affect the total thrust, but not the burn time.*/
+  void SetTotalIspVariation(double var) {TotalIspVariation = var;}
+
+  /** Returns the thrust variation, if any. */
+  double GetThrustVariation(void) const {return ThrustVariation;}
+
+  /** Returns the Total Isp variation, if any. */
+  double GetTotalIspVariation(void) const {return TotalIspVariation;}
 
 private:
   /** Reduces the fuel in the active tanks by the amount required.
@@ -192,6 +217,8 @@ private:
   double It;
   double MxR; // Mixture Ratio
   double BurnTime;
+  double ThrustVariation;
+  double TotalIspVariation;
   double VacThrust;
   double previousFuelNeedPerTank;
   double previousOxiNeedPerTank;
@@ -200,6 +227,7 @@ private:
   double OxidizerFlowRate;
   double PropellantFlowRate;
   bool Flameout;
+  double BuildupTime;
   FGTable* ThrustTable;
 
   void Debug(int from);