File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
Simulation/RollingStocks/SubSystems Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,10 @@ public abstract class TrainControlSystem : AbstractTrainScriptClass
273
273
/// </summary>
274
274
public Func < float > LineSpeedMpS ;
275
275
/// <summary>
276
+ /// Running total of distance travelled - negative or positive depending on train direction
277
+ /// </summary>
278
+ public Func < float > SignedDistanceM ;
279
+ /// <summary>
276
280
/// True if starting from terminal station (no track behind the train).
277
281
/// </summary>
278
282
public Func < bool > DoesStartFromTerminalStation ;
Original file line number Diff line number Diff line change @@ -373,6 +373,7 @@ public void Initialize()
373
373
Script . AltitudeM = ( ) => Locomotive . WorldPosition . Location . Y ;
374
374
Script . CurrentGradientPercent = ( ) => - Locomotive . CurrentElevationPercent ;
375
375
Script . LineSpeedMpS = ( ) => ( float ) Simulator . TRK . Tr_RouteFile . SpeedLimit ;
376
+ Script . SignedDistanceM = ( ) => Locomotive . Train . DistanceTravelledM ;
376
377
Script . DoesStartFromTerminalStation = ( ) => DoesStartFromTerminalStation ( ) ;
377
378
Script . IsColdStart = ( ) => Locomotive . Train . ColdStart ;
378
379
Script . GetTrackNodeOffset = ( ) => Locomotive . Train . FrontTDBTraveller . TrackNodeLength - Locomotive . Train . FrontTDBTraveller . TrackNodeOffset ;
You can’t perform that action at this time.
0 commit comments