INCLUDES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
-#ifdef FGFS
-# include <simgear/compiler.h>
-# include STL_ALGORITHM
-#else
-# include <algorithm>
-#endif
+#include <sstream>
#include "FGNozzle.h"
+#include "FGAtmosphere.h"
namespace JSBSim {
}
Thrust = 0;
+ ReverserAngle = 0.0;
Type = ttNozzle;
Area2 = (Diameter*Diameter/4.0)*M_PI;
AreaT = Area2/ExpR;
{
double pAtm = fdmex->GetAtmosphere()->GetPressure();
Thrust = max((double)0.0, (CfPc * AreaT + (PE - pAtm)*Area2) * nzlEff);
- vFn(1) = Thrust;
+ vFn(1) = Thrust * cos(ReverserAngle);
return Thrust;
}
return PE;
}
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+string FGNozzle::GetThrusterLabels(int id)
+{
+ std::ostringstream buf;
+
+ buf << Name << "_Thrust[" << id << ']';
+
+ return buf.str();
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+string FGNozzle::GetThrusterValues(int id)
+{
+ std::ostringstream buf;
+
+ buf << Thrust;
+
+ return buf.str();
+}
+
//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
// The bitmasked value choices are as follows:
// unset: In this case (the default) JSBSim would only print