Skip to content

Commit 6d20123

Browse files
committed
Automatic merge of T1.5.1-913-g91804456c and 16 pull requests
- Pull request #570 at 3539862: Experimental glTF 2.0 support with PBR lighting - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder - Pull request #882 at a057eff: Blueprint/train car operations UI window - Pull request #886 at 6c0785b: Scene viewer extension to TrackViewer - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #896 at 5866028: First implementation of https://blueprints.launchpad.net/or/+spec/specific-sounds-for-ai-trains - Pull request #903 at 9bead33: Downloading route content (Github, zip) - Pull request #910 at 97d4569: Allow building code using .NET 6 (Windows) - Pull request #911 at 6834af0: docs: Add refactoring as a special type of PR - Pull request #912 at f7b85e4: New Triple Valve Features Vol. 2 - Pull request #919 at e6c08a2: Added mouse wheel support for controls which can be moved by pressing t… - Pull request #920 at a94e403: Update RailDriver in Manual - Pull request #923 at e0f3c55: Add curve squeal to route - Pull request #924 at 6c2c3cd: Default Asset Improvements - Pull request #925 at e3b1688: Fix brakeshoe force bug
18 parents d272ab8 + 9180445 + 3539862 + d00beb9 + f92de76 + a057eff + 6c0785b + 1f5ba4c + 5866028 + 9bead33 + 97d4569 + 6834af0 + f7b85e4 + e6c08a2 + a94e403 + e0f3c55 + 6c2c3cd + e3b1688 commit 6d20123

File tree

1 file changed

+16
-0
lines changed
  • Source/Orts.Simulation/Simulation/RollingStocks

1 file changed

+16
-0
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/TrainCar.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,18 @@ public virtual void Initialize()
734734
BrakeSystem.Initialize();
735735
CurveSpeedDependent = Simulator.Settings.CurveSpeedDependent;
736736

737+
// Check Brake Shoe Friction parameters
738+
if (BrakeShoeType == BrakeShoeTypes.Cast_Iron_P10 || BrakeShoeType == BrakeShoeTypes.Cast_Iron_P6 || BrakeShoeType == BrakeShoeTypes.High_Friction_Composite || BrakeShoeType == BrakeShoeTypes.Disc_Pads)
739+
{
740+
float NewtonsTokNewtons = 0.001f;
741+
float maxBrakeShoeForcekN = NewtonsTokNewtons * MaxBrakeShoeForceN / NumberCarBrakeShoes;
742+
743+
if (maxBrakeShoeForcekN > 21 && Simulator.Settings.VerboseConfigurationMessages)
744+
{
745+
Trace.TraceInformation("Maximum force per brakeshoe is {0} and has exceeded {1}, check MaxBrakeShoeForceN {2} or NumberCarBrakeShoes {3}", FormatStrings.FormatForce(maxBrakeShoeForcekN * 1000, IsMetric), FormatStrings.FormatForce(20 * 1000, IsMetric), FormatStrings.FormatForce(MaxBrakeShoeForceN, IsMetric), NumberCarBrakeShoes);
746+
}
747+
}
748+
737749
//CurveForceFilter.Initialize();
738750

739751
// Initialize tunnel resistance values
@@ -3442,6 +3454,10 @@ public float KarwatzkiBrakeShoeFriction ( float k1, float k2, float k3, float k4
34423454
var friction = 0.0f;
34433455
float NewtonsTokNewtons = 0.001f;
34443456
float brakeShoeForcekN = NewtonsTokNewtons * BrakeShoeForceN / NumberCarBrakeShoes;
3457+
if (brakeShoeForcekN > 22.5) // Make sure that brake shoe force doesn't exceed 22.5 as it will cause a -ve brakeshoe CoF
3458+
{
3459+
brakeShoeForcekN = 21;
3460+
}
34453461
friction = k1 * ((brakeShoeForcekN + k2) / (brakeShoeForcekN + k3)) * ((MpS.ToKpH(AbsSpeedMpS) + k4) / (MpS.ToKpH(AbsSpeedMpS) + k5));
34463462

34473463
return friction;

0 commit comments

Comments
 (0)