]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/models/propulsion/FGElectric.cpp
Merge branch 'next' into durk-atc
[flightgear.git] / src / FDM / JSBSim / models / propulsion / FGElectric.cpp
index 1138d820cceed7fe97b849229c8057af6eb1f8d9..cbcb9220a4decf33e47c3d9ff2ba76d361d26186 100644 (file)
@@ -50,7 +50,7 @@ using namespace std;
 
 namespace JSBSim {
 
-static const char *IdSrc = "$Id: FGElectric.cpp,v 1.9 2010/08/21 17:13:48 jberndt Exp $";
+static const char *IdSrc = "$Id: FGElectric.cpp,v 1.10 2011/03/10 01:35:25 dpculp Exp $";
 static const char *IdHdr = ID_ELECTRIC;
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -92,12 +92,17 @@ void FGElectric::Calculate(void)
   RPM = Thruster->GetRPM() * Thruster->GetGearRatio();
 
   HP = PowerWatts * Throttle / hptowatts;
+  
+  Thruster->Calculate(HP * hptoftlbssec);
 
-  PowerAvailable = (HP * hptoftlbssec) - Thruster->GetPowerRequired();
+  RunPostFunctions();
+}
 
-  Thruster->Calculate(PowerAvailable);
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-  RunPostFunctions();
+double FGElectric::CalcFuelNeed(void)
+{
+  return 0;
 }
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -174,10 +179,4 @@ void FGElectric::Debug(int from)
   }
 }
 
-double
-FGElectric::CalcFuelNeed(void)
-{
-  return 0;
-}
-
 } // namespace JSBSim