@@ -195,8 +195,13 @@ public static string GetText(Content content)
195
195
details . AppendFormat ( "Power:\t {1}{0}" , Environment . NewLine , FormatStrings . FormatPower ( data . MaxPowerW , IsMetric , IsImperialBHP , IsImperialBTUpS ) ) ;
196
196
details . AppendFormat ( "MaxTE:\t {1}{0}" , Environment . NewLine , FormatStrings . FormatForce ( data . MaxTractiveForceN , IsMetric ) ) ;
197
197
details . AppendFormat ( "MaxDynBrk:\t {1}{0}" , Environment . NewLine , FormatStrings . FormatForce ( data . MaxDynamicBrakeForceN , IsMetric ) ) ;
198
- if ( ! IsMetric && ! IsUK ) { details . AppendFormat ( "HPT:\t {1}{0}" , Environment . NewLine , FormatHPT ( data . MaxPowerW , data . MassKG ) ) ; }
199
- if ( ! IsMetric && ! IsUK ) { details . AppendFormat ( "TpOB:\t {1}{0}" , Environment . NewLine , FormatTPOB ( data . MassKG , data . NumOperativeBrakes ) ) ; }
198
+ if ( ! IsMetric && ! IsUK )
199
+ {
200
+ details . AppendFormat ( "HPT:\t {1}{0}" , Environment . NewLine , FormatHPT ( data . MaxPowerW , data . MassKG ) ) ;
201
+ details . AppendFormat ( "TpOB:\t {1}{0}" , Environment . NewLine , FormatTPOB ( data . MassKG , data . NumOperativeBrakes ) ) ;
202
+ details . AppendFormat ( "TpEPA:\t {1}{0}" , Environment . NewLine , FormatTonsPerEPA ( data . MassKG , data . MaxTractiveForceN ) ) ;
203
+ details . AppendFormat ( "TpEDBA:\t {1}{0}" , Environment . NewLine , FormatTonsPerEDBA ( data . MassKG , data . MaxDynamicBrakeForceN ) ) ;
204
+ }
200
205
details . AppendFormat ( "MinCouplerStrength:\t {1}{0}" , Environment . NewLine , FormatStrings . FormatForce ( data . MinCouplerStrengthN , IsMetric ) ) ;
201
206
details . AppendFormat ( "MinDerailForce:\t {1}{0}" , Environment . NewLine , FormatStrings . FormatForce ( data . MinDerailForceN , IsMetric ) ) ;
202
207
details . AppendLine ( ) ;
@@ -273,9 +278,6 @@ static string FormatMassBar(float massKg)
273
278
/// <summary>
274
279
/// Calculate and format horsepower per ton for consist, rounded to one decimal.
275
280
/// </summary>
276
- /// <param name="consistPowerW"></param>
277
- /// <param name="consistMassKG"></param>
278
- /// <returns>horsepower-per-ton formated to one decimal.</returns>
279
281
//TODO: implement UK and metric version
280
282
static string FormatHPT ( float consistPowerW , float consistMassKG )
281
283
{
@@ -286,14 +288,33 @@ static string FormatHPT(float consistPowerW, float consistMassKG)
286
288
/// <summary>
287
289
/// Calculate and format tons per operative brake for consist, rounded to an integer.
288
290
/// </summary>
289
- /// <param name="consistMassKG"></param>
290
- /// <param name="consistNumOpBrakes"></param>
291
- /// <returns>tons-per-operative-brake formated to an integer.</returns>
292
291
//TODO: implement UK and metric version
293
292
static string FormatTPOB ( float consistMassKG , float consistNumOpBrakes )
294
293
{
295
294
var tpob = consistNumOpBrakes > 0 ? Kg . ToTUS ( consistMassKG ) / consistNumOpBrakes : 0 ;
296
295
return string . Format ( "{0:0}" , tpob ) ;
297
296
}
297
+
298
+ /// <summary>
299
+ /// Calculate and format tons per equivalent powered axle, rounded to an integer.
300
+ /// Based on UP convention, of 10k lbf counting as one axle.
301
+ /// Strictly, EPA should be defined in the eng file. May be done in future.
302
+ /// </summary>
303
+ static string FormatTonsPerEPA ( float consistMassKG , float consistMaxTractiveEffortN )
304
+ {
305
+ var tpepa = consistMaxTractiveEffortN > 0 ? Kg . ToTUS ( consistMassKG ) / ( N . ToLbf ( consistMaxTractiveEffortN ) / 10000f ) : 0 ;
306
+ return string . Format ( "{0:0}" , tpepa ) ;
307
+ }
308
+
309
+ /// <summary>
310
+ /// Calculate and format tons per equivalent dynamic brake axle, rounded to an integer.
311
+ /// Based on UP convention, of 10k lbf counting as one axle.
312
+ /// Strictly, EDBA should be defined in the eng file. May be done in future.
313
+ /// </summary>
314
+ static string FormatTonsPerEDBA ( float consistMassKG , float consistMaxDynamicBrakeForceN )
315
+ {
316
+ var tpedba = consistMaxDynamicBrakeForceN > 0 ? Kg . ToTUS ( consistMassKG ) / ( N . ToLbf ( consistMaxDynamicBrakeForceN ) / 10000f ) : 0 ;
317
+ return string . Format ( "{0:0}" , tpedba ) ;
318
+ }
298
319
}
299
320
}
0 commit comments