@@ -583,6 +583,9 @@ public Direction Direction
583583 protected SmoothedData CurveForceFilter = new SmoothedData ( 0.75f ) ;
584584 public float CurveForceNFiltered ;
585585
586+ protected SmoothedData CurveSquealAoAmRadFilter = new SmoothedData ( 0.75f ) ;
587+ public float CurveSquealAoAmRadFiltered ;
588+
586589 public float TunnelForceN ; // Resistive force due to tunnel, in Newtons
587590 public float FrictionForceN ; // in Newtons ( kg.m/s^2 ) unsigned, includes effects of curvature
588591 public float BrakeForceN ; // current braking force applied to slow train (Newtons) - will be impacted by wheel/rail friction
@@ -970,6 +973,9 @@ public virtual void Update(float elapsedClockSeconds)
970973
971974 AngleOfAttackmRad = GetAngleofAttackmRad ( ) ;
972975
976+ CurveSquealAoAmRadFilter . Update ( elapsedClockSeconds , AngleOfAttackmRad ) ;
977+ CurveSquealAoAmRadFiltered = CurveSquealAoAmRadFilter . SmoothedValue ;
978+
973979 UpdateCurveSpeedLimit ( ) ; // call this first as it will provide inputs for the curve force.
974980 UpdateCurveForce ( elapsedClockSeconds ) ;
975981 UpdateTunnelForce ( ) ;
@@ -2265,6 +2271,7 @@ public virtual void Save(BinaryWriter outf)
22652271 outf . Write ( CarHeatCurrentCompartmentHeatJ ) ;
22662272 outf . Write ( CarSteamHeatMainPipeSteamPressurePSI ) ;
22672273 outf . Write ( CarHeatCompartmentHeaterOn ) ;
2274+ outf . Write ( CurveSquealAoAmRadFiltered ) ;
22682275 }
22692276
22702277 // Game restore
@@ -2289,6 +2296,8 @@ public virtual void Restore(BinaryReader inf)
22892296 CarSteamHeatMainPipeSteamPressurePSI = inf . ReadSingle ( ) ;
22902297 CarHeatCompartmentHeaterOn = inf . ReadBoolean ( ) ;
22912298 FreightAnimations ? . LoadDataList ? . Clear ( ) ;
2299+ CurveSquealAoAmRadFiltered = inf . ReadSingle ( ) ;
2300+ CurveSquealAoAmRadFilter . ForceSmoothValue ( CurveSquealAoAmRadFiltered ) ;
22922301 }
22932302
22942303 //================================================================================================//
0 commit comments