]> git.mxchange.org Git - flightgear.git/blobdiff - src/FDM/JSBSim/FGPropeller.cpp
Updated to match changes in radiostack.[ch]xx
[flightgear.git] / src / FDM / JSBSim / FGPropeller.cpp
index e4d54e7ad80ea747aaa302e7b8a2621251231040..1bd9118ef6de4cfe8401b8e1d437f923c182d4aa 100644 (file)
@@ -127,7 +127,7 @@ FGPropeller::~FGPropeller()
 double FGPropeller::Calculate(double PowerAvailable)
 {
   double J, C_Thrust, omega;
-  double Vel = fdmex->GetTranslation()->GetvAeroUVW(eU);
+  double Vel = fdmex->GetTranslation()->GetAeroUVW(eU);
   double rho = fdmex->GetAtmosphere()->GetDensity();
   double RPS = RPM/60.0;
   double alpha, beta;
@@ -177,6 +177,12 @@ double FGPropeller::Calculate(double PowerAvailable)
   ExcessTorque = PowerAvailable / omega;
   RPM = (RPS + ((ExcessTorque / Ixx) / (2.0 * M_PI)) * deltaT) * 60.0;
 
+                               // The friction from the engine should
+                               // stop it somewhere; I chose an
+                               // arbitrary point.
+  if (RPM < 5.0)
+    RPM = 0;
+
   vMn = fdmex->GetRotation()->GetPQR()*vH + vTorque*Sense;
 
   return Thrust; // return thrust in pounds
@@ -190,7 +196,7 @@ double FGPropeller::GetPowerRequired(void)
 
   double cPReq, RPS = RPM / 60.0;
 
-  double J = fdmex->GetTranslation()->GetvAeroUVW(eU) / (Diameter * RPS);
+  double J = fdmex->GetTranslation()->GetAeroUVW(eU) / (Diameter * RPS);
   double rho = fdmex->GetAtmosphere()->GetDensity();
 
   if (MaxPitch == MinPitch) { // Fixed pitch prop