]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGEngine.cpp
Updates from JSBSim, including new turbine engine model from David Culp
[flightgear.git] / src / FDM / JSBSim / FGEngine.cpp
index 7f7c2956c1d9fffc7dd632dc658a4853e73e56fd..0117166d7209cf48f085b14a34e4da9e844f33fd 100644 (file)
@@ -56,6 +56,8 @@ INCLUDES
 #include "FGEngine.h"
 #include "FGTank.h"
 
+namespace JSBSim {
+
 static const char *IdSrc = "$Id$";
 static const char *IdHdr = ID_ENGINE;
 
@@ -65,28 +67,41 @@ CLASS IMPLEMENTATION
 
 
 FGEngine::FGEngine(FGFDMExec* exec)
+  : Name(""),
+    Type(etUnknown),
+    X(0), Y(0), Z(0),
+    EnginePitch(0), EngineYaw(0),
+    SLFuelFlowMax(0), SLOxiFlowMax(0),
+    MaxThrottle(1.0), MinThrottle(0.0),
+    Thrust(0.0),
+    Throttle(0.0),
+    Mixture(1.0),
+    Magnetos(0),
+    Starter(false),
+    FuelNeed(0.0), OxidizerNeed(0.0),
+    Starved(false), Flameout(false), Running(false), Cranking(false),
+    PctPower(0.0),
+    EngineNumber(-1),
+    TrimMode(false),
+    FuelFlow_gph(0.0),
+    ManifoldPressure_inHg(0.0),
+    ExhaustGasTemp_degK(0.0),
+    CylinderHeadTemp_degK(0.0),
+    OilPressure_psi(0.0),
+    OilTemp_degK(0.0),
+    FDMExec(exec),
+    State(FDMExec->GetState()),
+    Atmosphere(FDMExec->GetAtmosphere()),
+    FCS(FDMExec->GetFCS()),
+    Propulsion(FDMExec->GetPropulsion()),
+    Aircraft(FDMExec->GetAircraft()),
+    Translation(FDMExec->GetTranslation()),
+    Rotation(FDMExec->GetRotation()),
+    Position(FDMExec->GetPosition()),
+    Auxiliary(FDMExec->GetAuxiliary()),
+    Output(FDMExec->GetOutput())
 {
-  FDMExec     = exec;
-  State       = FDMExec->GetState();
-  Atmosphere  = FDMExec->GetAtmosphere();
-  FCS         = FDMExec->GetFCS();
-  Propulsion  = FDMExec->GetPropulsion();
-  Aircraft    = FDMExec->GetAircraft();
-  Translation = FDMExec->GetTranslation();
-  Rotation    = FDMExec->GetRotation();
-  Position    = FDMExec->GetPosition();
-  Auxiliary   = FDMExec->GetAuxiliary();
-  Output      = FDMExec->GetOutput();
-
-  Mixture = 1.0;               // FIXME: get actual value
-
-  Thrust = PctPower = 0.0;
-  Starved = Flameout = false;
-  Running = false;
-  Cranking = Starter = false;
-
   Debug(0);
-  TrimMode = false;
 }
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -191,4 +206,11 @@ void FGEngine::Debug(int from)
   }
   if (debug_lvl & 16) { // Sanity checking
   }
+  if (debug_lvl & 64) {
+    if (from == 0) { // Constructor
+      cout << IdSrc << endl;
+      cout << IdHdr << endl;
+    }
+  }
+}
 }