@@ -136,9 +136,9 @@ public Tr_RouteFile(STFReader stf)
136136 {
137137 // No superelevation standard defined, create the default one
138138 if ( SuperElevationHgtpRadiusM != null )
139- SuperElevation . Add ( new SuperElevationStandard ( SuperElevationHgtpRadiusM , MilepostUnitsMetric ) ) ;
139+ SuperElevation . Add ( new SuperElevationStandard ( SuperElevationHgtpRadiusM , MilepostUnitsMetric , SpeedLimit > 45.0f ) ) ;
140140 else
141- SuperElevation . Add ( new SuperElevationStandard ( MilepostUnitsMetric ) ) ;
141+ SuperElevation . Add ( new SuperElevationStandard ( MilepostUnitsMetric , SpeedLimit > 45.0f ) ) ;
142142 }
143143 }
144144
@@ -248,41 +248,70 @@ public class SuperElevationStandard
248248 public bool UseLegacyCalculation = true ; // Should ORTSTrackSuperElevation be used for superelevation calculations?
249249
250250 // Initialize new instance with default values (default metric values)
251- public SuperElevationStandard ( bool metric = true )
251+ public SuperElevationStandard ( bool metric = true , bool highSpeed = false )
252252 {
253253 if ( metric )
254254 {
255255 // Set underbalance to millimeter values for metric routes
256- MaxFreightUnderbalanceM = 0.100f ; // Default 100 mm
257- MaxPaxUnderbalanceM = 0.150f ; // Default 150 mm
256+ if ( highSpeed )
257+ {
258+ RunoffSpeedMpS = 0.080f ; // 80 mm / sec for higher speed routes
259+ MaxFreightUnderbalanceM = 0.110f ; // 110 mm for higher speed routes
260+ MaxPaxUnderbalanceM = 0.150f ; // 150 mm for higher speed routes
261+ }
262+ else
263+ {
264+ MaxFreightUnderbalanceM = 0.100f ; // Default 100 mm
265+ MaxPaxUnderbalanceM = 0.130f ; // Default 130 mm
266+ }
258267 // Other parameters are already metric by default
268+
259269 }
260270 else
261271 {
262272 // Set values in imperial units
263- MaxFreightUnderbalanceM = Me . FromIn ( 2.0f ) ; // Default 2 inches
264- MaxPaxUnderbalanceM = Me . FromIn ( 3.0f ) ; // Default 3 inches
265273 MinCantM = Me . FromIn ( 0.5f ) ;
266274 MaxCantM = Me . FromIn ( 6.0f ) ;
267275 MinSpeedMpS = MpS . FromMpH ( 15.0f ) ;
268276 PrecisionM = Me . FromIn ( 0.25f ) ;
269- RunoffSpeedMpS = MpS . FromMpH ( 0.0852f ) ; // 1.5 inches per second
277+
278+ if ( highSpeed )
279+ {
280+ RunoffSpeedMpS = MpS . FromMpH ( 0.1136f ) ; // 2.0 inches for higher speed routes
281+ MaxFreightUnderbalanceM = Me . FromIn ( 3.0f ) ; // 3 inches for higher speed routes
282+ MaxPaxUnderbalanceM = Me . FromIn ( 5.0f ) ; // 5 inches for higher speed routes
283+ }
284+ else
285+ {
286+ RunoffSpeedMpS = MpS . FromMpH ( 0.0852f ) ; // Default 1.5 inches per second
287+ MaxFreightUnderbalanceM = Me . FromIn ( 2.0f ) ; // Default 2 inches
288+ MaxPaxUnderbalanceM = Me . FromIn ( 3.0f ) ; // Default 3 inches
289+ }
270290 }
271291 }
272292
273293 // Initialize new instance from superelevation interpolator
274294 // Interpolator X values should be curve radius, Y values amount of superelevation in meters
275- public SuperElevationStandard ( Interpolator elevTable , bool metric = true )
295+ public SuperElevationStandard ( Interpolator elevTable , bool metric = true , bool highSpeed = false )
276296 {
277297 MinCantM = elevTable . Y . Min ( ) ;
278298 MaxCantM = elevTable . Y . Max ( ) ;
279299
280- if ( ! metric )
300+ MinSpeedMpS = 0.0f ;
301+
302+ if ( metric )
303+ {
304+ if ( highSpeed )
305+ RunoffSpeedMpS = 0.080f ; // 80 mm / sec of runoff allows for shorter build up on high speed routes
306+ }
307+ else
281308 {
282309 // Some extra data still required, use imperial units if the route uses it
283- MinSpeedMpS = MpS . FromMpH ( 15.0f ) ;
284310 PrecisionM = Me . FromIn ( 0.25f ) ;
285- RunoffSpeedMpS = MpS . FromMpH ( 0.0852f ) ; // 1.5 inches per second
311+ if ( highSpeed )
312+ RunoffSpeedMpS = MpS . FromMpH ( 0.1136f ) ; // 2.0 inches per second of runoff allows for shorter build up on high speed routes
313+ else
314+ RunoffSpeedMpS = MpS . FromMpH ( 0.0852f ) ; // 1.5 inches per second normal
286315 }
287316 }
288317
0 commit comments