Skip to content

Commit 960a986

Browse files
committed
Automatic merge of T1.5.1-664-gd39447273 and 7 pull requests
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #865 at 776d6df: Dispatcher window improvements - Pull request #874 at e90cf2b: Dynamic brake controller refactoring - Pull request #875 at 43bf33e: Bug fix for https://bugs.launchpad.net/or/+bug/2036346 Player train switching doesn't work with 3D cabs - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder - Pull request #878 at 2a7fb17: Implement Polach Adhesion - Pull request #879 at 5a0ff7b: chore: remove Website folder
9 parents 9b2b3cc + d394472 + d00beb9 + 776d6df + e90cf2b + 43bf33e + f92de76 + 2a7fb17 + 5a0ff7b commit 960a986

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

Source/ORTS.Common/Conversions.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,15 @@ public static string FormatSpeedDisplay(float speed, bool isMetric)
595595
"{0:F1} {1}", MpS.FromMpS(speed, isMetric), isMetric ? kmph : mph);
596596
}
597597

598+
/// <summary>
599+
/// Formatted localized speed string, used to display tracking speed, with 2 decimal precision
600+
/// </summary>
601+
public static string FormatVeryLowSpeedDisplay(float speed, bool isMetric)
602+
{
603+
return String.Format(CultureInfo.CurrentCulture,
604+
"{0:F2} {1}", MpS.FromMpS(speed, isMetric), isMetric ? kmph : mph);
605+
}
606+
598607
/// <summary>
599608
/// Formatted localized speed string, used to display speed limits, with 0 decimal precision
600609
/// </summary>

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerTransmissions/Axle.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ public void ComputeWheelSlipThresholdMpS()
571571
if (fa * fb > 0)
572572
{
573573
// If sign does not change, bisection fails
574-
WheelSlipThresholdMpS = MpS.FromKpH(0.2f);
574+
WheelSlipThresholdMpS = MpS.FromKpH(0.05f);
575575
return;
576576
}
577577
while (Math.Abs(b - a) > MpS.FromKpH(0.05f))
@@ -874,6 +874,8 @@ public virtual void Update(float timeSpan)
874874
axleStaticForceN = AxleWeightN * SlipCharacteristics(0);
875875
ComputeWheelSlipThresholdMpS();
876876

877+
// Trace.TraceInformation("Threshold - Threshold {0} SlipSpeed {1} Speed {2}", WheelSlipThresholdMpS, SlipSpeedMpS, TrainSpeedMpS);
878+
877879
if (count < 6 && count++ == 5)
878880
{
879881
TrainSpeedMpS = 10 / 3.6f;

Source/RunActivity/Viewer3D/Popups/HUDWindow.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,20 +1080,20 @@ void TextPageForceInfo(TableData table)
10801080
{
10811081
TableAddLine(table, Viewer.Catalog.GetString("(Advanced adhesion model)"));
10821082
int row0 = table.CurrentRow;
1083-
TableSetCell(table, table.CurrentRow++, table.CurrentLabelColumn, Viewer.Catalog.GetString("Wheel slip"));
1083+
TableSetCell(table, table.CurrentRow++, table.CurrentLabelColumn, Viewer.Catalog.GetString("Wheel slip (Thres)"));
10841084
TableSetCell(table, table.CurrentRow++, table.CurrentLabelColumn, Viewer.Catalog.GetString("Conditions"));
10851085
TableSetCell(table, table.CurrentRow++, table.CurrentLabelColumn, Viewer.Catalog.GetString("Axle drive force"));
10861086
TableSetCell(table, table.CurrentRow++, table.CurrentLabelColumn, Viewer.Catalog.GetString("Axle brake force"));
10871087
TableSetCell(table, table.CurrentRow++, table.CurrentLabelColumn, Viewer.Catalog.GetString("Number of substeps"));
10881088
TableSetCell(table, table.CurrentRow++, table.CurrentLabelColumn, Viewer.Catalog.GetString("Wheel Adhesion"));
10891089
TableSetCell(table, table.CurrentRow++, table.CurrentLabelColumn, Viewer.Catalog.GetString("Axle out force"));
10901090
TableSetCell(table, table.CurrentRow++, table.CurrentLabelColumn, Viewer.Catalog.GetString("Comp Axle out force"));
1091-
TableSetCell(table, table.CurrentRow++, table.CurrentLabelColumn, Viewer.Catalog.GetString("Wheel speed"));
1091+
TableSetCell(table, table.CurrentRow++, table.CurrentLabelColumn, Viewer.Catalog.GetString("Wheel speed (Slip)"));
10921092
for (int i = 0; i < mstsLocomotive.LocomotiveAxles.Count; i++)
10931093
{
10941094
table.CurrentRow = row0;
10951095
var axle = mstsLocomotive.LocomotiveAxles[i];
1096-
TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0:F0}% ({1})", axle.SlipSpeedPercent, FormatStrings.FormatSpeedDisplay((float)axle.WheelSlipThresholdMpS, true));
1096+
TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0:F0}% ({1})", axle.SlipSpeedPercent, FormatStrings.FormatVeryLowSpeedDisplay((float)axle.WheelSlipThresholdMpS, mstsLocomotive.IsMetric));
10971097
TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0:F0}%", mstsLocomotive.AdhesionConditions * 100.0f);
10981098
TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0} ({1})", FormatStrings.FormatForce(axle.DriveForceN, mstsLocomotive.IsMetric), FormatStrings.FormatPower(axle.DriveForceN * mstsLocomotive.AbsTractionSpeedMpS, mstsLocomotive.IsMetric, false, false));
10991099
TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0}", FormatStrings.FormatForce(axle.BrakeRetardForceN, mstsLocomotive.IsMetric));
@@ -1104,7 +1104,7 @@ void TextPageForceInfo(TableData table)
11041104
TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0} ({1})",
11051105
FormatStrings.FormatForce(axle.CompensatedAxleForceN, mstsLocomotive.IsMetric),
11061106
FormatStrings.FormatPower(axle.CompensatedAxleForceN * mstsLocomotive.AbsTractionSpeedMpS, mstsLocomotive.IsMetric, false, false));
1107-
TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0} ({1})", FormatStrings.FormatSpeedDisplay((float)axle.AxleSpeedMpS, mstsLocomotive.IsMetric), FormatStrings.FormatSpeedDisplay(axle.SlipSpeedMpS, mstsLocomotive.IsMetric));
1107+
TableSetCell(table, table.CurrentRow++, table.CurrentValueColumn + 2 * i, "{0} ({1})", FormatStrings.FormatSpeedDisplay((float)axle.AxleSpeedMpS, mstsLocomotive.IsMetric), FormatStrings.FormatVeryLowSpeedDisplay(axle.SlipSpeedMpS, mstsLocomotive.IsMetric));
11081108
}
11091109
if (HUDEngineType == TrainCar.EngineTypes.Steam && (HUDSteamEngineType == TrainCar.SteamEngineTypes.Compound || HUDSteamEngineType == TrainCar.SteamEngineTypes.Simple || HUDSteamEngineType == TrainCar.SteamEngineTypes.Unknown)) TableAddLabelValue(table, Viewer.Catalog.GetString("Wheel ang. pos."), "{0}º", (int)(mstsLocomotive.LocomotiveAxles[0].AxlePositionRad * 180 / Math.PI + 180));
11101110
TableAddLabelValue(table, Viewer.Catalog.GetString("Loco Adhesion"), "{0:F0}%", mstsLocomotive.LocomotiveCoefficientFrictionHUD * 100.0f);

0 commit comments

Comments
 (0)