You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Automatic merge of T1.6-108-g8fb3285d6 and 13 pull requests
- Pull request #1156 at f46d5f2: Fix incorrectly disabled options in train operations window
- Pull request #1091 at 492795a: Automatic speed control
- Pull request #1120 at ba3c47f: Automatically Calculate Friction Values if Missing
- Pull request #1121 at 91d2d26: Manually Override Articulation
- Pull request #1124 at e241a0d: Built-in PBL2 brake controller
- Pull request #1157 at 39cd994: Dynamic brake authorization by TCS
- Pull request #1159 at 48c9a63: Skip OR warnings about TSRE-specific token Ruler
- Pull request #1162 at 2516cce: specifies precedence of DDS over ACE
- Pull request #1163 at 2f9e292: Fix: Crash when using Camera 8 and F9.
- Pull request #1164 at 1ad9889: Fix: F9 crashes with a front coupled single steam locomotive by Csantucci.
- Pull request #1082 at d3722cd: Allow variable water level in glass gauge
- Pull request #1128 at 086d502: Particle Emitter Overhaul
- Pull request #1160 at 9dc6b3b: Route Based TTrack Sounds
Copy file name to clipboardExpand all lines: Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs
+77-77Lines changed: 77 additions & 77 deletions
Original file line number
Diff line number
Diff line change
@@ -1468,6 +1468,34 @@ public override void Initialize()
1468
1468
1469
1469
CylinderSteamUsageLBpS = 1.0f; // Set to 1 to ensure that there are no divide by zero errors
1470
1470
1471
+
if (BoilerEvapRateLbspFt2 == 0) // If boiler evaporation rate is not in ENG file then set a default value
1472
+
{
1473
+
if (SteamLocomotiveFuelType == SteamLocomotiveFuelTypes.Wood)
1474
+
{
1475
+
BoilerEvapRateLbspFt2 = 11.5f; // Default rate for evaporation rate. Assume a default rate of 12 lbs/sqft of evaporation area
1476
+
}
1477
+
else if (SteamLocomotiveFuelType == SteamLocomotiveFuelTypes.Oil)
1478
+
{
1479
+
BoilerEvapRateLbspFt2 = 18.0f; // Default rate for evaporation rate. Assume a default rate of 18 lbs/sqft of evaporation area
1480
+
}
1481
+
else
1482
+
{
1483
+
BoilerEvapRateLbspFt2 = 15.0f; // Default rate for evaporation rate. Assume a default rate of 15 lbs/sqft of evaporation area
1484
+
}
1485
+
}
1486
+
BoilerEvapRateLbspFt2 = MathHelper.Clamp(BoilerEvapRateLbspFt2, 7.5f, 30.0f); // Clamp BoilerEvap Rate to between 7.5 & 30 - some modern locomotives can go as high as 30, but majority are around 15.
1487
+
TheoreticalMaxSteamOutputLBpS = pS.FrompH(Me2.ToFt2(EvaporationAreaM2) * BoilerEvapRateLbspFt2); // set max boiler theoretical steam output
if (BoilerVolumeCheck > 15) // If boiler volume is not in ENG file or less then a viable figure (ie high ratio figure), then set to a default value
1491
+
{
1492
+
BoilerVolumeFT3 = Me2.ToFt2(EvaporationAreaM2) / 8.3f; // Default rate for evaporation rate. Assume a default ratio of evaporation area * 1/8.3
1493
+
// Advise player that Boiler Volume is missing from or incorrect in ENG file
1494
+
if (Simulator.Settings.VerboseConfigurationMessages)
1495
+
Trace.TraceWarning("Boiler Volume not found in ENG file, or doesn't appear to be a valid figure, and has been set to {0} Ft^3", BoilerVolumeFT3);
1496
+
}
1497
+
1498
+
1471
1499
// Set up boiler water defaults
1472
1500
1473
1501
// Water Gauge Length - always use OR entered value as first preference
@@ -1476,11 +1504,46 @@ public override void Initialize()
1476
1504
// Boiler Length - always use OR entered value as first preference
1477
1505
BoilerLengthM = ORBoilerLengthM;
1478
1506
1507
+
// If OR value hasn't been set, then use MSTS value if present
1508
+
if (BoilerLengthM == 0 && MSTSBoilerLengthM > 0)
1509
+
{
1510
+
if (MSTSBoilerLengthM > 0.4f * CarLengthM && MSTSBoilerLengthM < CarLengthM) // Check validity of MSTS value
1511
+
{
1512
+
BoilerLengthM = MSTSBoilerLengthM;
1513
+
}
1514
+
else
1515
+
{
1516
+
BoilerLengthM = Me.FromFt(20.0f); // limit default boiler length to 20 ft
1517
+
}
1518
+
1519
+
if (Simulator.Settings.VerboseConfigurationMessages)
1520
+
{
1521
+
Trace.TraceInformation("Boiler Length set as per MSTS default = {0}", FormatStrings.FormatDistance(BoilerLengthM, IsMetric));
1522
+
}
1523
+
}
1524
+
else if (BoilerLengthM == 0 && MSTSBoilerLengthM == 0)
1525
+
{
1526
+
if (HasTenderCoupled)
1527
+
{
1528
+
BoilerLengthM = 0.48f * CarLengthM; // Set default boiler length for tank locomotives
1529
+
}
1530
+
else
1531
+
{
1532
+
BoilerLengthM = 0.6f * CarLengthM; // Set default boiler length for tender locomotives
1533
+
}
1534
+
1535
+
if (Simulator.Settings.VerboseConfigurationMessages)
1536
+
{
1537
+
Trace.TraceInformation("Boiler Length set to default = {0}", FormatStrings.FormatDistance(BoilerLengthM, IsMetric));
1538
+
}
1539
+
}
1540
+
1479
1541
if (BoilerDiameterM == 0)
1480
1542
{
1481
-
BoilerDiameterM = Me.FromFt(6.0f); // Set default boiler diameter to 6 ft
1543
+
BoilerDiameterM = 3.3f * (float)Math.Sqrt(Me3.FromFt3(BoilerVolumeFT3) / (float)(Math.PI * BoilerLengthM)); // Set default boiler diameter based upon boiler volume and length
1544
+
1482
1545
if (Simulator.Settings.VerboseConfigurationMessages)
1483
-
Trace.TraceWarning("Boiler Diameter not found in ENG file and has been set to {0}", FormatStrings.FormatDistance(BoilerDiameterM, IsMetric)); // Advise player that Boiler Diameter is missing from ENG file
1546
+
Trace.TraceWarning("Boiler Diameter not found in ENG file and has been set to {0}", FormatStrings.FormatDistance(BoilerDiameterM, IsMetric));
1484
1547
}
1485
1548
1486
1549
// Water model - locomotive boilers require water level to be maintained above the firebox crown sheet
@@ -1499,37 +1562,10 @@ public override void Initialize()
1499
1562
{
1500
1563
BoilerCrownCoverageHeightM = Me.FromIn(3.0f); // Set default crown coverage height to 3"
1501
1564
if (Simulator.Settings.VerboseConfigurationMessages)
1502
-
Trace.TraceWarning("Boiler Crown Coverage Height not found in ENG file and has been set to {0}", FormatStrings.FormatVeryShortDistanceDisplay(BoilerCrownCoverageHeightM, IsMetric)); // Advise player that Boiler Crown Coverage Height is missing from ENG file
1565
+
Trace.TraceWarning("Boiler Crown Coverage Height not found in ENG file and has been set to {0}", FormatStrings.FormatVeryShortDistanceDisplay(BoilerCrownCoverageHeightM, IsMetric));
1503
1566
}
1504
1567
1505
-
// Initialise Boiler parameters
1506
-
1507
-
// If OR value hasn't been set, then use MSTS value if present
1508
-
if (BoilerLengthM == 0 && MSTSBoilerLengthM > 0)
1509
-
{
1510
-
if (MSTSBoilerLengthM > 0.4f * CarLengthM && MSTSBoilerLengthM < CarLengthM)
1511
-
{
1512
-
BoilerLengthM = MSTSBoilerLengthM;
1513
-
}
1514
-
else
1515
-
{
1516
-
BoilerLengthM = Me.FromFt(20.0f); // Set default boiler length to 20 ft
1517
-
}
1518
-
1519
-
if (Simulator.Settings.VerboseConfigurationMessages)
1520
-
{
1521
-
Trace.TraceInformation("Boiler Length set as per MSTS default = {0}", FormatStrings.FormatDistance(BoilerLengthM, IsMetric));
1522
-
}
1523
-
}
1524
-
else if (BoilerLengthM == 0 && MSTSBoilerLengthM == 0)
1525
-
{
1526
-
BoilerLengthM = Me.FromFt(20.0f); // Set default boiler length to 20 ft
1527
-
1528
-
if (Simulator.Settings.VerboseConfigurationMessages)
1529
-
{
1530
-
Trace.TraceInformation("Boiler Length set to default = {0}", FormatStrings.FormatDistance(BoilerLengthM, IsMetric));
1531
-
}
1532
-
}
1568
+
// Initialise Boiler parameters, if not found in Eng file
1533
1569
1534
1570
// If OR value hasn't been set, then use MSTS value if present
@@ -1576,34 +1612,6 @@ public override void Initialize()
1576
1612
1577
1613
float MaxWaterFraction = BoilerWaterFractionAbs; // Initialise the max water fraction when the boiler starts
1578
1614
1579
-
if (BoilerEvapRateLbspFt2 == 0) // If boiler evaporation rate is not in ENG file then set a default value
1580
-
{
1581
-
if (SteamLocomotiveFuelType == SteamLocomotiveFuelTypes.Wood)
1582
-
{
1583
-
BoilerEvapRateLbspFt2 = 11.5f; // Default rate for evaporation rate. Assume a default rate of 12 lbs/sqft of evaporation area
1584
-
}
1585
-
else if (SteamLocomotiveFuelType == SteamLocomotiveFuelTypes.Oil)
1586
-
{
1587
-
BoilerEvapRateLbspFt2 = 18.0f; // Default rate for evaporation rate. Assume a default rate of 18 lbs/sqft of evaporation area
1588
-
}
1589
-
else
1590
-
{
1591
-
BoilerEvapRateLbspFt2 = 15.0f; // Default rate for evaporation rate. Assume a default rate of 15 lbs/sqft of evaporation area
1592
-
}
1593
-
}
1594
-
BoilerEvapRateLbspFt2 = MathHelper.Clamp(BoilerEvapRateLbspFt2, 7.5f, 30.0f); // Clamp BoilerEvap Rate to between 7.5 & 30 - some modern locomotives can go as high as 30, but majority are around 15.
1595
-
TheoreticalMaxSteamOutputLBpS = pS.FrompH(Me2.ToFt2(EvaporationAreaM2) * BoilerEvapRateLbspFt2); // set max boiler theoretical steam output
else if (CurrentWaterGaugeFraction <= 0.55 && CurrentWaterGaugeFraction > 0.50 && !InjectorLockedOut) // turn injector 1 on 25% if water level in boiler drops between 0.5 and 0.55 water gauge
else if (CurrentWaterGaugeFraction <= 0.50 && CurrentWaterGaugeFraction > 0.45 && !InjectorLockedOut) // turn injector 1 on 50% if water level in boiler drops between 0.5 and 0.45
else if (CurrentWaterGaugeFraction <= 0.45 && CurrentWaterGaugeFraction > 0.40 && !InjectorLockedOut) // turn injector 1 on 100% if water level in boiler drops between 0.4 and 0.45
0 commit comments