@@ -419,13 +419,10 @@ public string GetStatus()
419419
420420 if ( Locomotive . DieselTransmissionType == MSTSDieselLocomotive . DieselTransmissionTypes . Mechanic )
421421 {
422- result . AppendFormat ( "\t {0}\t {1}" , Simulator . Catalog . GetParticularString ( "HUD" , "Power" ) , Simulator . Catalog . GetString ( " " ) ) ;
422+ result . AppendFormat ( "\t {0}\t {1}" , Simulator . Catalog . GetParticularString ( "HUD" , "Power" ) , Simulator . Catalog . GetString ( " " ) ) ; // Leave maximum power out
423423 foreach ( var eng in DEList )
424424 {
425- // Power(Watts) = Torque(Nm) * rpm / 9.54.
426- var tempPowerDisplay = eng . GearBox . torqueCurveMultiplier * eng . DieselTorqueTab [ eng . RealRPM ] * eng . RealRPM / 9.54f ;
427- tempPowerDisplay = MathHelper . Clamp ( tempPowerDisplay , 0 , MaxOutputPowerW ) ; // Clamp throttle setting within bounds
428- result . AppendFormat ( "\t {0}" , FormatStrings . FormatPower ( tempPowerDisplay , Locomotive . IsMetric , false , false ) ) ;
425+ result . AppendFormat ( "\t {0}" , FormatStrings . FormatPower ( eng . CurrentDieselOutputPowerW , Locomotive . IsMetric , false , false ) ) ;
429426 }
430427 }
431428 else
@@ -923,14 +920,7 @@ public float LoadPercent
923920 {
924921 get
925922 {
926- if ( Locomotive . DieselTransmissionType == MSTSDieselLocomotive . DieselTransmissionTypes . Mechanic )
927- {
928- return CurrentDieselOutputPowerW <= 0f ? 0f : ( ( ( Locomotive . MotiveForceN * Locomotive . SpeedMpS ) + ( Locomotive . DieselEngines . NumOfActiveEngines > 0 ? Locomotive . LocomotivePowerSupply . ElectricTrainSupplyPowerW / Locomotive . DieselEngines . NumOfActiveEngines : 0f ) ) * 100f / CurrentDieselOutputPowerW ) ;
929- }
930- else
931- {
932- return CurrentDieselOutputPowerW <= 0f ? 0f : ( ( OutputPowerW + ( Locomotive . DieselEngines . NumOfActiveEngines > 0 ? Locomotive . LocomotivePowerSupply . ElectricTrainSupplyPowerW / Locomotive . DieselEngines . NumOfActiveEngines : 0f ) ) * 100f / CurrentDieselOutputPowerW ) ;
933- }
923+ return CurrentDieselOutputPowerW <= 0f ? 0f : ( ( OutputPowerW + ( Locomotive . DieselEngines . NumOfActiveEngines > 0 ? Locomotive . LocomotivePowerSupply . ElectricTrainSupplyPowerW / Locomotive . DieselEngines . NumOfActiveEngines : 0f ) ) * 100f / CurrentDieselOutputPowerW ) ;
934924 }
935925 }
936926 /// <summary>
@@ -1440,7 +1430,9 @@ public void Update(float elapsedClockSeconds)
14401430 // so set output power based upon throttle demanded power
14411431 if ( HasGearBox && Locomotive . DieselTransmissionType == MSTSDieselLocomotive . DieselTransmissionTypes . Mechanic )
14421432 {
1443- CurrentDieselOutputPowerW = ( ThrottleRPMTab [ demandedThrottlePercent ] - IdleRPM ) / ( MaxRPM - IdleRPM ) * MaximumDieselPowerW * ( 1 - Locomotive . PowerReduction ) ;
1433+ // Power(Watts) = Torque(Nm) * rpm / 9.54.
1434+ CurrentDieselOutputPowerW = GearBox . torqueCurveMultiplier * DieselTorqueTab [ RealRPM ] * RealRPM / 9.54f ;
1435+ CurrentDieselOutputPowerW = MathHelper . Clamp ( CurrentDieselOutputPowerW , 0 , MaximumDieselPowerW ) ; // Clamp throttle setting within bounds
14441436 }
14451437
14461438 if ( Locomotive . DieselEngines . NumOfActiveEngines > 0 )
0 commit comments