@@ -131,6 +131,7 @@ public enum SoundState
131
131
public float MaxSpeedMpS = 1e3f ;
132
132
public float UnloadingSpeedMpS ;
133
133
public float MainResPressurePSI = 130 ;
134
+ public float BrakePipeFlowM3pS ;
134
135
public float MaximumMainReservoirPipePressurePSI ;
135
136
public bool CompressorIsOn ;
136
137
public bool CompressorIsMechanical = false ;
@@ -146,6 +147,9 @@ public enum SoundState
146
147
public bool OnLineCabRadio ;
147
148
public string OnLineCabRadioURL ;
148
149
150
+ public float FilteredBrakePipeFlowM3pS ;
151
+ public IIRFilter AFMFilter ;
152
+
149
153
// Water trough filling
150
154
public bool HasWaterScoop = false ; // indicates whether loco + tender have a water scoop or not
151
155
public float ScoopMaxPickupSpeedMpS = 200.0f ; // Maximum scoop pickup speed - used in steam locomotive viewer
@@ -417,7 +421,7 @@ public float OdometerM
417
421
protected const float DefaultMainResVolume = 0.78f ; // Value to be inserted if .eng parameters are corrected
418
422
protected const float DefaultMaxMainResPressure = 140 ; // Max value to be inserted if .eng parameters are corrected
419
423
420
- public List < CabView > CabViewList = new List < CabView > ( ) ;
424
+ public List < CabView > CabViewList = new List < CabView > ( ) ;
421
425
public CabView3D CabView3D ;
422
426
423
427
public MSTSNotchController SteamHeatController = new MSTSNotchController ( 0 , 1 , 0.1f ) ;
@@ -482,6 +486,7 @@ public MSTSLocomotive(Simulator simulator, string wagPath)
482
486
LocomotiveAxles . Add ( new Axle ( ) ) ;
483
487
CurrentFilter = new IIRFilter ( IIRFilter . FilterTypes . Butterworth , 1 , IIRFilter . HzToRad ( 0.5f ) , 0.001f ) ;
484
488
AdhesionFilter = new IIRFilter ( IIRFilter . FilterTypes . Butterworth , 1 , IIRFilter . HzToRad ( 1f ) , 0.001f ) ;
489
+ AFMFilter = new IIRFilter ( IIRFilter . FilterTypes . Butterworth , 1 , IIRFilter . HzToRad ( 0.1f ) , 1.0f ) ;
485
490
486
491
TrainBrakeController = new ScriptedBrakeController ( this ) ;
487
492
EngineBrakeController = new ScriptedBrakeController ( this ) ;
@@ -5418,6 +5423,32 @@ public virtual float GetDataOf(CabViewControl cvc)
5418
5423
data = ( TrainBrakeController == null || ! TrainBrakeController . OverchargeButtonPressed ) ? 0 : 1 ;
5419
5424
break ;
5420
5425
}
5426
+ case CABViewControlTypes . ORTS_AIR_FLOW_METER :
5427
+ {
5428
+ switch ( cvc . Units )
5429
+ {
5430
+ case CABViewControlUnits . CUBIC_FT_MIN :
5431
+ data = this . FilteredBrakePipeFlowM3pS * 35.3147f * 60.0f ;
5432
+ break ;
5433
+
5434
+ case CABViewControlUnits . LITRES_S :
5435
+ case CABViewControlUnits . LITERS_S :
5436
+ data = this . FilteredBrakePipeFlowM3pS * 1000.0f ;
5437
+ break ;
5438
+
5439
+ case CABViewControlUnits . LITRES_MIN :
5440
+ case CABViewControlUnits . LITERS_MIN :
5441
+ data = this . FilteredBrakePipeFlowM3pS * 1000.0f * 60.0f ;
5442
+ break ;
5443
+
5444
+ case CABViewControlUnits . CUBIC_M_S :
5445
+ default :
5446
+ data = this . FilteredBrakePipeFlowM3pS ;
5447
+ break ;
5448
+
5449
+ }
5450
+ break ;
5451
+ }
5421
5452
case CABViewControlTypes . FRICTION_BRAKING :
5422
5453
{
5423
5454
data = ( BrakeSystem == null ) ? 0.0f : BrakeSystem . GetCylPressurePSI ( ) ;
@@ -5541,7 +5572,6 @@ public virtual float GetDataOf(CabViewControl cvc)
5541
5572
5542
5573
}
5543
5574
}
5544
-
5545
5575
}
5546
5576
else
5547
5577
{
0 commit comments