]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/models/propulsion/FGNozzle.cpp
Better fix for a compilation problem with MSVC 2012
[flightgear.git] / src / FDM / JSBSim / models / propulsion / FGNozzle.cpp
index f1d0fb12e1911e07bc223f71fbe70d41656c6bf2..c9616e1a2f3b78691eee3719ef2d406c9ed729fc 100644 (file)
@@ -40,14 +40,13 @@ INCLUDES
 #include <cstdlib>
 
 #include "FGNozzle.h"
-#include "models/FGAtmosphere.h"
 #include "input_output/FGXMLElement.h"
 
 using namespace std;
 
 namespace JSBSim {
 
-static const char *IdSrc = "$Id: FGNozzle.cpp,v 1.13 2009/10/26 03:49:58 jberndt Exp $";
+static const char *IdSrc = "$Id: FGNozzle.cpp,v 1.15 2012/03/18 15:48:35 jentron Exp $";
 static const char *IdHdr = ID_NOZZLE;
 
 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -64,14 +63,7 @@ FGNozzle::FGNozzle(FGFDMExec* FDMExec, Element* nozzle_element, int num)
     cerr << "Fatal Error: Nozzle exit area must be given in nozzle config file." << endl;
     exit(-1);
   }
-/*
-  if (nozzle_element->FindElement("pe"))
-    PE = nozzle_element->FindElementValueAsNumberConvertTo("pe", "PSF");
-  else {
-    cerr << "Fatal Error: Nozzle exit pressure must be given in nozzle config file." << endl;
-    exit(-1);
-  }
-*/
+
   Thrust = 0;
   Type = ttNozzle;
   
@@ -89,8 +81,7 @@ FGNozzle::~FGNozzle()
 
 double FGNozzle::Calculate(double vacThrust)
 {
-  double pAtm = fdmex->GetAtmosphere()->GetPressure();
-  Thrust = max((double)0.0, vacThrust - pAtm*Area);
+  Thrust = max((double)0.0, vacThrust - in.Pressure*Area);
 
   vFn(1) = Thrust * cos(ReverserAngle);
 
@@ -99,7 +90,7 @@ double FGNozzle::Calculate(double vacThrust)
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-string FGNozzle::GetThrusterLabels(int id, string delimeter)
+string FGNozzle::GetThrusterLabels(int id, const string& delimeter)
 {
   std::ostringstream buf;
 
@@ -110,7 +101,7 @@ string FGNozzle::GetThrusterLabels(int id, string delimeter)
 
 //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
-string FGNozzle::GetThrusterValues(int id, string delimeter)
+string FGNozzle::GetThrusterValues(int id, const string& delimeter)
 {
   std::ostringstream buf;