-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Header: FGThruster.h
Author: Jon S. Berndt
--------------------------------------------------------------------------------
08/24/00 JSB Created
-********************************************************************************
-COMMENTS, REFERENCES, and NOTES
-********************************************************************************
-
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#ifndef FGTHRUSTER_H
#define FGTHRUSTER_H
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGForce.h"
+#include "FGConfigFile.h"
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+DEFINITIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+#define ID_THRUSTER "$Id$"
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+FORWARD DECLARATIONS
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
+
+namespace JSBSim {
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+CLASS DOCUMENTATION
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-/*******************************************************************************
+/** Base class for specific thrusting devices such as propellers, nozzles, etc.
+ @author Jon Berndt
+ @version $Id$
+ */
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
class FGThruster : public FGForce {
public:
+ /// Constructor
FGThruster(FGFDMExec *FDMExec);
- ~FGThruster(void);
-
- enum Type {ttNozzle, ttRotor, ttPropeller};
-
- virtual void Calculate(void);
+ FGThruster(FGFDMExec *FDMExec, FGConfigFile *Eng_cfg );
+ /// Destructor
+ virtual ~FGThruster();
+
+ enum eType {ttNozzle, ttRotor, ttPropeller, ttDirect};
+
+ virtual double Calculate(double tt) { Thrust = tt; vFn(1) = Thrust; return 0.0; }
+ void SetName(string name) {Name = name;}
+ 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;}
+ int GetThrusterNumber(void) {return ThrusterNumber;}
+ virtual double GetRPM(void) { return 0.0; };
+ double GetGearRatio(void) {return GearRatio; }
+
+protected:
+ eType Type;
+ string Name;
+ int ThrusterNumber;
+ double Thrust;
+ double PowerRequired;
+ double deltaT;
+ double GearRatio;
+ virtual void Debug(int from);
};
-
-/******************************************************************************/
+}
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif
+