#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;
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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;
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);
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGNozzle::GetThrusterLabels(int id, string delimeter)
+string FGNozzle::GetThrusterLabels(int id, const string& delimeter)
{
std::ostringstream buf;
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-string FGNozzle::GetThrusterValues(int id, string delimeter)
+string FGNozzle::GetThrusterValues(int id, const string& delimeter)
{
std::ostringstream buf;