@@ -299,6 +299,8 @@ public float ConvectionFactor
299
299
public float _SpeedMpS ; // meters per second; updated by train physics, relative to direction of car 50mph = 22MpS
300
300
public float _PrevSpeedMpS ;
301
301
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
302
304
public float CouplerSlackM ; // extra distance between cars (calculated based on relative speeds)
303
305
public int HUDCouplerForceIndication = 0 ; // Flag to indicate whether coupler is 1 - pulling, 2 - pushing or 0 - neither
304
306
public float CouplerSlack2M ; // slack calculated using draft gear force
@@ -2203,7 +2205,7 @@ public virtual string GetDebugStatus()
2203
2205
String . Format ( "{0}" , FormatStrings . FormatSpeedDisplay ( SpeedMpS , IsMetric ) ) ,
2204
2206
loco . DieselEngines [ 0 ] . GearBox . HuDShaftRPM ,
2205
2207
// 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 ) ,
2207
2209
String . Format ( "{0}{1}" , FormatStrings . FormatForce ( TractiveForceN , IsMetric ) , WheelSlip ? "!!!" : WheelSlipWarning ? "???" : "" ) ,
2208
2210
Simulator . Catalog . GetString ( locomotivetypetext )
2209
2211
) ;
@@ -2218,7 +2220,7 @@ public virtual string GetDebugStatus()
2218
2220
ThrottlePercent ,
2219
2221
String . Format ( "{0}" , FormatStrings . FormatSpeedDisplay ( SpeedMpS , IsMetric ) ) ,
2220
2222
// 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 ) ,
2222
2224
String . Format ( "{0}{1}" , FormatStrings . FormatForce ( TractiveForceN , IsMetric ) , WheelSlip ? "!!!" : WheelSlipWarning ? "???" : "" ) ,
2223
2225
Simulator . Catalog . GetString ( locomotivetypetext )
2224
2226
) ;
0 commit comments