]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGPropulsion.cpp
Frederic Bouvier:
[flightgear.git] / src / FDM / JSBSim / FGPropulsion.cpp
index a7a31a38b4f4e7415863a55098ab4f261f6fe84b..09cf080c8b3f799266ca4d827ca34707a1420a12 100644 (file)
@@ -108,7 +108,7 @@ bool FGPropulsion::Run(void)
 
   for (unsigned int i=0; i<numTanks; i++) {
     Tanks[i]->Calculate( dt * rate );
-  }     
+  }
 
   if (refuel) DoRefuel( dt * rate );
 
@@ -231,20 +231,20 @@ bool FGPropulsion::Load(FGConfigFile* AC_cfg)
         ThrottleAdded = true;
 
         if (engType == "FG_ROCKET") {
-          Engines.push_back(new FGRocket(FDMExec, Cfg_ptr));
+          Engines.push_back(new FGRocket(FDMExec, Cfg_ptr, numEngines));
         } else if (engType == "FG_PISTON") {
-          Engines.push_back(new FGPiston(FDMExec, Cfg_ptr));
+          Engines.push_back(new FGPiston(FDMExec, Cfg_ptr, numEngines));
         } else if (engType == "FG_TURBINE") {
-          Engines.push_back(new FGTurbine(FDMExec, Cfg_ptr));
+          Engines.push_back(new FGTurbine(FDMExec, Cfg_ptr, numEngines));
         } else if (engType == "FG_SIMTURBINE") {
           cerr << endl;
           cerr << "The FG_SIMTURBINE engine type has been renamed to FG_TURBINE." << endl;
           cerr << "To fix this problem, simply replace the FG_SIMTURBINE name " << endl;
           cerr << "in your engine file to FG_TURBINE." << endl;
           cerr << endl;
-          Engines.push_back(new FGTurbine(FDMExec, Cfg_ptr));
+          Engines.push_back(new FGTurbine(FDMExec, Cfg_ptr, numEngines));
         } else if (engType == "FG_ELECTRIC") {
-          Engines.push_back(new FGElectric(FDMExec, Cfg_ptr));
+          Engines.push_back(new FGElectric(FDMExec, Cfg_ptr, numEngines));
         } else {
           cerr << fgred << "    Unrecognized engine type: " << underon << engType
                     << underoff << " found in config file." << fgdef << endl;
@@ -281,7 +281,6 @@ bool FGPropulsion::Load(FGConfigFile* AC_cfg)
         }
 
         Engines[numEngines]->SetPlacement(xLoc, yLoc, zLoc, Pitch, Yaw);
-        Engines[numEngines]->SetEngineNumber(numEngines);
         numEngines++;
 
       } else {
@@ -328,7 +327,7 @@ string FGPropulsion::GetPropulsionStrings(void)
     if (firstime)  firstime = false;
     else           PropulsionStrings += ", ";
 
-    PropulsionStrings += Engines[i]->GetEngineLabels() + ", ";
+    PropulsionStrings += Engines[i]->GetEngineLabels();
   }
 
   return PropulsionStrings;
@@ -345,7 +344,7 @@ string FGPropulsion::GetPropulsionValues(void)
     if (firstime)  firstime = false;
     else           PropulsionValues += ", ";
 
-    PropulsionValues += Engines[i]->GetEngineValues() + ", ";
+    PropulsionValues += Engines[i]->GetEngineValues();
   }
 
   return PropulsionValues;
@@ -494,7 +493,7 @@ void FGPropulsion::DoRefuel(double time_slice)
       if (Tanks[i]->GetPctFull() < 99.99)
           Transfer(-1, i, fillrate/TanksNotFull);
     }
-  }      
+  }
 }
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%