]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGPropulsion.h
Fix stall widths for the "auxilliary" (reverse flow) stalls so they
[flightgear.git] / src / FDM / JSBSim / FGPropulsion.h
index 49f8ac8a60d06cc7431a2c27469134cd2cba5bee..6d143f79b1bd2909fbefd61d9652bd12cca93bd5 100644 (file)
@@ -55,7 +55,6 @@ INCLUDES
 #include "FGModel.h"
 #include "FGEngine.h"
 #include "FGTank.h"
-#include "FGThruster.h"
 #include "FGMatrix33.h"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -76,27 +75,18 @@ CLASS DOCUMENTATION
 
 /** Propulsion management class.
     The Propulsion class is the container for the entire propulsion system, which is
-    comprised of engines, tanks, and "thrusters" (the device that transforms the
-    engine power into a force that acts on the aircraft, such as a nozzle or
-    propeller). Once the Propulsion class gets the config file, it reads in
-    information which is specific to a type of engine. Then:
+    comprised of engines, and tanks. Once the Propulsion class gets the config file,
+    it reads in information which is specific to a type of engine. Then:
 
     -# The appropriate engine type instance is created
-    -# A thruster object is instantiated, and is linked to the engine
     -# At least one tank object is created, and is linked to an engine.
 
-    At Run time each engines Calculate() method is called to return the excess power
-    generated during that iteration. The drag from the previous iteration is sub-
-    tracted to give the excess power available for thrust this pass. That quantity
-    is passed to the thrusters associated with a particular engine - perhaps with a
-    scaling mechanism (gearing?) to allow the engine to give its associated thrust-
-    ers specific distributed portions of the excess power.
+    At Run time each engines Calculate() method is called.
     @author Jon S. Berndt
     @version $Id$
     @see
     FGEngine
     FGTank
-    FGThruster
 */
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -113,22 +103,12 @@ public:
 
   /** Executes the propulsion model.
       The initial plan for the FGPropulsion class calls for Run() to be executed,
-      performing the following tasks:
-      <ol>
-  <li>Determine the drag - or power required - for the attached thrust effector
-      for this engine so that any feedback to the engine can be performed. This
-      is done by calling FGThruster::CalculatePReq()</li>
-  <li>Given 1, above, calculate the power available from the engine. This is
-      done by calling FGEngine::CalculatePAvail()</li>
-  <li>Next, calculate the thrust output from the thruster model given the power
-      available and the power required. This may also result in new performance
-      numbers for the thruster in the case of the propeller, at least. This
-      result is returned from a call to Calculate().</li></ol>
+      calculating the power available from the engine.
 
       [Note: Should we be checking the Starved flag here?] */
   bool Run(void);
 
-  /** Loads the propulsion system (engine[s], tank[s], thruster[s]).
+  /** Loads the propulsion system (engine[s] and tank[s]).
       Characteristics of the propulsion system are read in from the config file.
       @param AC_cfg pointer to the config file instance that describes the
              aircraft being modeled.
@@ -157,35 +137,32 @@ public:
                       if (index <= Tanks.size()-1) return Tanks[index];
                       else                         return 0L;        }
 
-  /** Retrieves a thruster object pointer from the list of thrusters.
-      @param index the thruster index within the vector container
-      @return the address of the specific thruster, or zero if no such thruster is
-              available */
-  inline FGThruster* GetThruster(unsigned int index) {
-                      if (index <= Thrusters.size()-1) return Thrusters[index];
-                      else                             return 0L;    }
-
   /** Returns the number of fuel tanks currently actively supplying fuel */
   inline int GetnumSelectedFuelTanks(void) const {return numSelectedFuelTanks;}
 
   /** Returns the number of oxidizer tanks currently actively supplying oxidizer */
   inline int GetnumSelectedOxiTanks(void) const {return numSelectedOxiTanks;}
 
-  /** Loops the engines/thrusters until thrust output steady (used for trimming) */
+  /** Loops the engines until thrust output steady (used for trimming) */
   bool GetSteadyState(void);
 
   /** starts the engines in IC mode (dt=0).  All engine-specific setup must
       be done before calling this (i.e. magnetos, starter engage, etc.) */
   bool ICEngineStart(void);
 
-  string GetPropulsionStrings(void);
-  string GetPropulsionValues(void);
+  string GetPropulsionStrings(string delimeter);
+  string GetPropulsionValues(string delimeter);
 
   inline FGColumnVector3& GetForces(void)  {return vForces; }
   inline double GetForces(int n) const { return vForces(n);}
   inline FGColumnVector3& GetMoments(void) {return vMoments;}
   inline double GetMoments(int n) const {return vMoments(n);}
 
+  inline bool GetRefuel(void) {return refuel;}
+  inline void SetRefuel(bool setting) {refuel = setting;} 
+  double Transfer(int source, int target, double amount);
+  void DoRefuel(double time_slice);
+
   FGColumnVector3& GetTanksMoment(void);
   double GetTanksWeight(void);
 
@@ -195,11 +172,13 @@ public:
   }
 
   inline int GetActiveEngine(void);
+  inline bool GetFuelFreeze(void) {return fuel_freeze;}
 
   void SetMagnetos(int setting);
   void SetStarter(int setting);
   void SetCutoff(int setting=0);
   void SetActiveEngine(int engine);
+  void SetFuelFreeze(bool f);  
   FGMatrix33& CalculateTankInertias(void);
 
   void bind();
@@ -209,21 +188,21 @@ private:
   vector <FGEngine*>   Engines;
   vector <FGTank*>     Tanks;
   vector <FGTank*>::iterator iTank;
-  vector <FGThruster*> Thrusters;
   unsigned int numSelectedFuelTanks;
   unsigned int numSelectedOxiTanks;
   unsigned int numFuelTanks;
   unsigned int numOxiTanks;
   unsigned int numEngines;
   unsigned int numTanks;
-  unsigned int numThrusters;
   int ActiveEngine;
-  double dt;
   FGColumnVector3 vForces;
   FGColumnVector3 vMoments;
   FGColumnVector3 vTankXYZ;
   FGColumnVector3 vXYZtank_arm;
   FGMatrix33 tankJ;
+  bool refuel;
+  bool fuel_freeze;
+
   void Debug(int from);
 };
 }