@@ -299,6 +299,8 @@ public float ConvectionFactor
299299 public float _SpeedMpS ; // meters per second; updated by train physics, relative to direction of car 50mph = 22MpS
300300 public float _PrevSpeedMpS ;
301301 public float AbsSpeedMpS ; // Math.Abs(SpeedMps) expression is repeated many times in the subclasses, maybe this deserves a class variable
302+ public float WheelSpeedMpS ;
303+ public float AbsWheelSpeedMpS ; // Math.Abs(WheelSpeedMpS) is used frequently in the subclasses, maybe it's more efficient to compute it once
302304 public float CouplerSlackM ; // extra distance between cars (calculated based on relative speeds)
303305 public int HUDCouplerForceIndication = 0 ; // Flag to indicate whether coupler is 1 - pulling, 2 - pushing or 0 - neither
304306 public float CouplerSlack2M ; // slack calculated using draft gear force
@@ -2203,7 +2205,7 @@ public virtual string GetDebugStatus()
22032205 String . Format ( "{0}" , FormatStrings . FormatSpeedDisplay ( SpeedMpS , IsMetric ) ) ,
22042206 loco . DieselEngines [ 0 ] . GearBox . HuDShaftRPM ,
22052207 // For Locomotive HUD display shows "forward" motive power (& force) as a positive value, braking power (& force) will be shown as negative values.
2206- FormatStrings . FormatPower ( TractiveForceN * SpeedMpS , IsMetric , false , false ) ,
2208+ FormatStrings . FormatPower ( TractiveForceN * WheelSpeedMpS , IsMetric , false , false ) ,
22072209 String . Format ( "{0}{1}" , FormatStrings . FormatForce ( TractiveForceN , IsMetric ) , WheelSlip ? "!!!" : WheelSlipWarning ? "???" : "" ) ,
22082210 Simulator . Catalog . GetString ( locomotivetypetext )
22092211 ) ;
@@ -2218,7 +2220,7 @@ public virtual string GetDebugStatus()
22182220 ThrottlePercent ,
22192221 String . Format ( "{0}" , FormatStrings . FormatSpeedDisplay ( SpeedMpS , IsMetric ) ) ,
22202222 // For Locomotive HUD display shows "forward" motive power (& force) as a positive value, braking power (& force) will be shown as negative values.
2221- FormatStrings . FormatPower ( TractiveForceN * SpeedMpS , IsMetric , false , false ) ,
2223+ FormatStrings . FormatPower ( TractiveForceN * WheelSpeedMpS , IsMetric , false , false ) ,
22222224 String . Format ( "{0}{1}" , FormatStrings . FormatForce ( TractiveForceN , IsMetric ) , WheelSlip ? "!!!" : WheelSlipWarning ? "???" : "" ) ,
22232225 Simulator . Catalog . GetString ( locomotivetypetext )
22242226 ) ;
0 commit comments