Skip to content

Commit

Permalink
Automatic merge of T1.5.1-155-g6cf0e6461 and 11 pull requests
Browse files Browse the repository at this point in the history
- Pull request #706 at 91bcfa2: Extended door functionality
- Pull request #719 at 13a1638: Upgraded to MonoGame 3.8.0 (+ small update for other libraries)
- Pull request #722 at fb9079e: Fix Windows Forms deprecations in ActivityEditor
- Pull request #732 at aac9b67: Improvements for air brakes
- Pull request #744 at 3c2dc07: Fixed and improved cabview control conditions related to power supply state
- Pull request #746 at b6acfde: Website release 1.5.1
- Pull request #748 at 4f0e878: latitude/longitude fix for bug 1393111
- Pull request #749 at db5764c: OpenRailway Map
- Pull request #753 at ab8fe32: Extends CabControls for user input
- Pull request #754 at 70a1325: Container weights: https://blueprints.launchpad.net/or/+spec/container-weights
- Pull request #758 at a63643a: Steam wheel slip#1
  • Loading branch information
openrails-bot committed Dec 31, 2022
13 parents 022656d + 6cf0e64 + 91bcfa2 + 13a1638 + fb9079e + aac9b67 + 3c2dc07 + b6acfde + 4f0e878 + db5764c + ab8fe32 + 70a1325 + a63643a commit 3d25902
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
10 changes: 10 additions & 0 deletions Source/Documentation/Manual/physics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,16 @@ The ``ORTSSlipControlSystem ( Full )`` parameter can be inserted
into the engine section of the .eng file to indicate the presence of
such system.

Steam locomotives will have varying magnitude of rotational forces depending upon the separation
between the cylinder crank angles.

The crank angles for example of a 2 cylinder locomotive has a 90 deg separation whereas a 3 cylinder locomotive
has a 120 deg variation. OR will default to a "common" value for the number of cylinders defined, but the user
can override this with "ORTSWheelCrankAngleDifference ( A B C D )", where A, B, C and D are the separations for
up to a 4 cylinder locomotive. For example, a 4 cylinder locomotive can have a separation of 90 deg for each
cylinder or sometimes it has two of the cranks separated by 45 deg instead. These values can either be in
Rad (default) or Deg.


Engine -- Classes of Motive Power
=================================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,7 @@ public class MSTSSteamLocomotive : MSTSLocomotive
bool CylinderCock42On = false;
public bool Cylinder2SteamEffects = false;
public bool CylinderAdvancedSteamEffects = false;
public bool CylinderAdvancedSteamExhaustEffects = false;
public bool GeneratorSteamEffects = false;
public float CompressorParticleDurationS = 3.0f;
public float Cylinder1ParticleDurationS = 3.0f;
Expand Down Expand Up @@ -2468,8 +2469,28 @@ private void UpdateFX(float elapsedClockSeconds)
float SmokeColorFireMass = (FireMassKG / IdealFireMassKG); // As firemass exceeds the ideal mass the fire becomes 'blocked', when firemass is < ideal then fire burns more freely.
SmokeColorFireMass = (1.0f / SmokeColorFireMass) * (1.0f / SmokeColorFireMass) * (1.0f / SmokeColorFireMass); // Inverse the firemass value, then cube it to make it a bit more significant

StackSteamVelocityMpS.Update(elapsedClockSeconds, (float)Math.Sqrt(KPa.FromPSI(Pressure_c_AtmPSI) * 1000 * 2 / WaterDensityAt100DegC1BarKGpM3));
StackSteamVolumeM3pS = Kg.FromLb(CylinderSteamUsageLBpS + BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) * SteamVaporSpecVolumeAt100DegC1BarM3pKG;
if (CylinderAdvancedSteamExhaustEffects)
{

if (CylinderSteamExhaust1On || CylinderSteamExhaust2On || CylinderSteamExhaust3On || CylinderSteamExhaust4On)
{
StackSteamVelocityMpS.Update(elapsedClockSeconds, (float)Math.Sqrt(KPa.FromPSI(Pressure_c_AtmPSI) * 1000 * 50 / WaterDensityAt100DegC1BarKGpM3));
StackSteamVolumeM3pS = Kg.FromLb(CylinderSteamUsageLBpS + BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) * 20 * SteamVaporSpecVolumeAt100DegC1BarM3pKG;
}
else
{
StackSteamVelocityMpS.Update(elapsedClockSeconds, (float)Math.Sqrt(KPa.FromPSI(Pressure_c_AtmPSI) * 0.5f * 1000 / WaterDensityAt100DegC1BarKGpM3));
StackSteamVolumeM3pS = Kg.FromLb(CylinderSteamUsageLBpS + BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) * 0.25f * SteamVaporSpecVolumeAt100DegC1BarM3pKG;

}
}
else
{
StackSteamVelocityMpS.Update(elapsedClockSeconds, (float)Math.Sqrt(KPa.FromPSI(Pressure_c_AtmPSI) * 1000 * 2 / WaterDensityAt100DegC1BarKGpM3));
StackSteamVolumeM3pS = Kg.FromLb(CylinderSteamUsageLBpS + BlowerSteamUsageLBpS + RadiationSteamLossLBpS + CompSteamUsageLBpS + GeneratorSteamUsageLBpS) * SteamVaporSpecVolumeAt100DegC1BarM3pKG;
}


float SmokeColorUnits = (RadiationSteamLossLBpS + CalculatedCarHeaterSteamUsageLBpS + BlowerBurnEffect + (SmokeColorDamper * SmokeColorFireMass)) / PreviousTotalSteamUsageLBpS - 0.2f;
SmokeColor.Update(elapsedClockSeconds, MathHelper.Clamp(SmokeColorUnits, 0.25f, 1));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ public MSTSSteamLocomotiveViewer(Viewer viewer, MSTSSteamLocomotive car)
else if (emitter.Key.ToLowerInvariant() == "cylinders42fx")
Cylinders42.AddRange(emitter.Value);
else if (emitter.Key.ToLowerInvariant() == "cylindersteamexhaust1fx")
{
CylinderSteamExhaust1.AddRange(emitter.Value);
car.CylinderAdvancedSteamExhaustEffects = true;
}
else if (emitter.Key.ToLowerInvariant() == "cylindersteamexhaust2fx")
CylinderSteamExhaust2.AddRange(emitter.Value);
else if (emitter.Key.ToLowerInvariant() == "cylindersteamexhaust3fx")
Expand Down

0 comments on commit 3d25902

Please sign in to comment.