]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGThruster.h
Make yasim accept the launchbar and hook properties. They are not tied to anything...
[flightgear.git] / src / FDM / JSBSim / FGThruster.h
index b9bef6d3e1229f95bf37f64467bc3aeeaf7d96a7..ff523588df49c244c7f4b4d1f6bca97735cea6b5 100644 (file)
@@ -40,6 +40,7 @@ INCLUDES
 
 #include "FGForce.h"
 #include "FGConfigFile.h"
+#include "FGPropertyManager.h"
 #include <string>
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -72,13 +73,17 @@ class FGThruster : public FGForce {
 public:
   /// Constructor
   FGThruster(FGFDMExec *FDMExec);
-  FGThruster(FGFDMExec *FDMExec, FGConfigFile *Eng_cfg );
+  FGThruster(FGFDMExec *FDMExec, FGConfigFile *Eng_cfg, int num );
   /// Destructor
   virtual ~FGThruster();
 
   enum eType {ttNozzle, ttRotor, ttPropeller, ttDirect};
 
-  virtual double Calculate(double tt) { Thrust = tt; vFn(1) = Thrust; return 0.0; }
+  virtual double Calculate(double tt) {
+       Thrust = tt;
+       vFn(1) = Thrust * cos(ReverserAngle);
+       return vFn(1);
+  }
   void SetName(string name) {Name = name;}
   virtual void SetRPM(double rpm) {};
   virtual double GetPowerRequired(void) {return 0.0;}
@@ -88,8 +93,13 @@ public:
   string GetName(void) {return Name;}
   virtual double GetRPM(void) { return 0.0; };
   double GetGearRatio(void) {return GearRatio; }
-  virtual string GetThrusterLabels(int id);
-  virtual string GetThrusterValues(int id);
+  virtual string GetThrusterLabels(int id, string delimeter);
+  virtual string GetThrusterValues(int id, string delimeter);
+  void SetReverserAngle(double radians) { ReverserAngle = radians; }
+  double GetReverserAngle(void) {return ReverserAngle;}
+
+
+  inline void SetThrustCoefficient(double ct) { ThrustCoeff = ct; }
 
 protected:
   eType Type;
@@ -98,6 +108,10 @@ protected:
   double PowerRequired;
   double deltaT;
   double GearRatio;
+  double ThrustCoeff;
+  double ReverserAngle;
+  int EngineNum;
+  FGPropertyManager* PropertyManager;
   virtual void Debug(int from);
 };
 }