]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGThruster.h
Encapsulate the interpolstion version of FGEnvironment and fix some bugs
[flightgear.git] / src / FDM / JSBSim / FGThruster.h
index c49b62c3b6f3194fb49fde1cf66354ac3b277c5a..a546b316395e09dfdb8cdd7779b66a914ffddc72 100644 (file)
@@ -27,10 +27,6 @@ HISTORY
 --------------------------------------------------------------------------------
 08/24/00  JSB  Created
 
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-COMMENTS, REFERENCES,  and NOTES
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@@ -45,12 +41,18 @@ INCLUDES
 #include "FGForce.h"
 #include "FGConfigFile.h"
 
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
 #define ID_THRUSTER "$Id$"
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
+FORWARD DECLARATIONS
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
+namespace JSBSim {
+
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DOCUMENTATION
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
@@ -69,29 +71,36 @@ class FGThruster : public FGForce {
 public:
   /// Constructor
   FGThruster(FGFDMExec *FDMExec);
+  FGThruster(FGFDMExec *FDMExec, FGConfigFile *Eng_cfg );
   /// Destructor
   virtual ~FGThruster();
 
-  enum eType {ttNozzle, ttRotor, ttPropeller};
+  enum eType {ttNozzle, ttRotor, ttPropeller, ttDirect};
 
-  virtual float Calculate(float) {return 0.0;}
+  virtual double Calculate(double tt) { Thrust = tt; vFn(1) = Thrust; return 0.0; }
   void SetName(string name) {Name = name;}
-  virtual float GetPowerRequired(void) {return 0.0;}
-  virtual void SetdeltaT(float dt) {deltaT = dt;}
-  float GetThrust(void) {return Thrust;}
+  void SetThrusterNumber(int nn) {ThrusterNumber = nn;}
+  virtual void SetRPM(double rpm) {};
+  virtual double GetPowerRequired(void) {return 0.0;}
+  virtual void SetdeltaT(double dt) {deltaT = dt;}
+  double GetThrust(void) {return Thrust;}
   eType GetType(void) {return Type;}
   string GetName(void) {return Name;}
-  virtual float GetRPM(void) { return 0.0; };
+  int GetThrusterNumber(void) {return ThrusterNumber;}
+  virtual double GetRPM(void) { return 0.0; };
+  double GetGearRatio(void) {return GearRatio; } 
 
 protected:
   eType Type;
   string Name;
-  float Thrust;
-  float PowerRequired;
-  float deltaT;
-  virtual void Debug(void);
+  int ThrusterNumber;
+  double Thrust;
+  double PowerRequired;
+  double deltaT;
+  double GearRatio;
+  virtual void Debug(int from);
 };
-
+}
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif