1
0
Fork 0

Tentative fix for the issue (propeller spinning indefinitely after aborting crank).

This commit is contained in:
Bertrand Coconnier 2021-05-08 18:50:34 +02:00
parent 2614945b8f
commit 773a44c072
2 changed files with 4 additions and 2 deletions
src/FDM/JSBSim/models/propulsion

View file

@ -521,7 +521,9 @@ void FGPiston::Calculate(void)
// Filters out negative powers. // Filters out negative powers.
// TODO: static_friction_HP should not be taken into account while the engine // TODO: static_friction_HP should not be taken into account while the engine
// is not started. // is not started.
Thruster->Calculate(max(HP * hptoftlbssec, 0.)); double power = HP * hptoftlbssec;
if (RPM <= 0.1) power = max(power, 0.0);
Thruster->Calculate(power);
RunPostFunctions(); RunPostFunctions();
} }

View file

@ -201,7 +201,7 @@ void FGPropeller::ResetToIC(void)
double FGPropeller::Calculate(double EnginePower) double FGPropeller::Calculate(double EnginePower)
{ {
FGColumnVector3 vDXYZ = MassBalance->StructuralToBody(vActingXYZn); FGColumnVector3 vDXYZ = MassBalance->StructuralToBody(vXYZn);
const FGMatrix33& mT = Transform(); const FGMatrix33& mT = Transform();
// Local air velocity is obtained from Stevens & Lewis' "Aircraft Control and // Local air velocity is obtained from Stevens & Lewis' "Aircraft Control and
// Simualtion (3rd edition)" eqn 8.2-1 // Simualtion (3rd edition)" eqn 8.2-1