]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGPiston.h
Fix a segfault on exit. Introduces a small memory leak if the instrument
[flightgear.git] / src / FDM / JSBSim / FGPiston.h
index 6437bb4a7434e7635a46804e0da2c443561a425a..a71197c3b0dbd0081d533ee3009779ebd01c32e4 100644 (file)
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
  Header:       FGPiston.h
  Author:       Jon S. Berndt
@@ -27,35 +27,48 @@ HISTORY
 --------------------------------------------------------------------------------
 09/12/2000  JSB  Created
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 COMMENTS, REFERENCES,  and NOTES
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #ifndef FGPISTON_H
 #define FGPISTON_H
 
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 #include "FGEngine.h"
+#include "FGConfigFile.h"
 
-/*******************************************************************************
+#define ID_PISTON "$Id$";
+
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
 
 class FGPiston : public FGEngine
 {
-
 public:
-  FGPiston();
+  FGPiston(FGFDMExec* exec, FGConfigFile* Eng_cfg);
   ~FGPiston();
 
+  float Calculate(float PowerRequired);
+  float GetPowerAvailable(void) {return PowerAvailable;}
+
+private:
+  float BrakeHorsePower;
+  float SpeedSlope;
+  float SpeedIntercept;
+  float AltitudeSlope;
+  float PowerAvailable;
+  void Debug(void);
 };
 
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 #endif
+