Skip to content

Commit b609b92

Browse files
committed
Automatic merge of T1.5.1-801-g8ef12d34f and 15 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 b554363: Blueprint/train car operations UI window - Pull request #885 at 8f94333: feat: Add notifications to Menu - 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 #897 at 42f1dd9: feat: Improved system information collection - Pull request #899 at 04b214b: Duplex steam engines - Booster Engine addition - Pull request #903 at 0d6d045: Downloading route content (Github, zip) - Pull request #907 at 9b0b04f: Bug fix for https://bugs.launchpad.net/or/+bug/2047300 Dynamic tracks disappear after long tunnel - Pull request #908 at 4b4afe3: feat: supports switching adhesion precisions - Pull request #911 at 6834af0: docs: Add refactoring as a special type of PR - Pull request #912 at 8106ea1: New Triple Valve Features Vol. 2
17 parents 97221e9 + 8ef12d3 + 3539862 + d00beb9 + f92de76 + b554363 + 8f94333 + 6c0785b + 1f5ba4c + 5866028 + 42f1dd9 + 04b214b + 0d6d045 + 9b0b04f + 4b4afe3 + 6834af0 + 8106ea1 commit b609b92

File tree

3 files changed

+12
-17
lines changed

3 files changed

+12
-17
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2552,7 +2552,7 @@ public override void Update(float elapsedClockSeconds)
25522552

25532553
UpdateSteamTractiveForce(elapsedClockSeconds, tractiveforcethrottle, 0, 0, i);
25542554

2555-
SteamDrvWheelWeightLbs += Kg.ToLb(SteamEngines[i].AttachedAxle.WheelWeightKg / SteamEngines[i].AttachedAxle.NumAxles); // Calculate the weight per axle (used in MSTSLocomotive for friction calculatons)
2555+
SteamDrvWheelWeightLbs += Kg.ToLb(SteamEngines[i].AttachedAxle.WheelWeightKg / SteamEngines[i].AttachedAxle.NumDriveAxles); // Calculate the weight per axle (used in MSTSLocomotive for friction calculatons)
25562556

25572557
}
25582558

@@ -6332,7 +6332,7 @@ public override void AdvancedAdhesion(float elapsedClockSeconds)
63326332
float TotalWheelMomentofInertia = WheelMomentInertia + AxleMomentInertia; // Total MoI for generic wheelset
63336333

63346334
// The moment of inertia needs to be increased by the number of wheels in each set
6335-
TotalWheelMomentofInertia *= linkedEngine.AttachedAxle.NumAxles;
6335+
TotalWheelMomentofInertia *= linkedEngine.AttachedAxle.NumDriveAxles;
63366336

63376337
// the inertia of the coupling rods can also be added
63386338
// Assume rods weigh approx 1500 lbs

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

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -235,13 +235,12 @@ public void Initialize()
235235
if (axle.InertiaKgm2 <= 0) axle.InertiaKgm2 = locomotive.AxleInertiaKgm2 / AxleList.Count;
236236
if (axle.WheelWeightKg <= 0) axle.WheelWeightKg = locomotive.DrvWheelWeightKg / AxleList.Count;
237237
if (axle.AxleWeightN <= 0) axle.AxleWeightN = 9.81f * axle.WheelWeightKg; //remains fixed for diesel/electric locomotives, but varies for steam locomotives
238-
if (axle.NumAxles <= 0) axle.NumAxles = locomotive.LocoNumDrvAxles;
238+
if (axle.NumDriveAxles <= 0) axle.NumDriveAxles = locomotive.LocoNumDrvAxles;
239239
if (axle.WheelRadiusM <= 0) axle.WheelRadiusM = locomotive.DriverWheelRadiusM;
240240
if (axle.WheelFlangeAngleRad <= 0) axle.WheelFlangeAngleRad = locomotive.MaximumWheelFlangeAngleRad;
241241
if (axle.DampingNs <= 0) axle.DampingNs = locomotive.MassKG / 1000.0f / AxleList.Count;
242242
if (axle.FrictionN <= 0) axle.FrictionN = locomotive.MassKG / 1000.0f / AxleList.Count;
243-
if (axle.NumberWheelAxles <= 0) axle.NumberWheelAxles = 1;
244-
243+
245244
// set the wheel slip threshold times for different types of locomotives
246245
// Because of the irregular force around the wheel for a steam engine during a revolution, "response" time for warnings needs to be lower
247246
if (locomotive.EngineType == TrainCar.EngineTypes.Steam)
@@ -590,7 +589,7 @@ public float TransmissionEfficiency
590589
/// <summary>
591590
/// Wheel number
592591
/// </summary>
593-
public int NumberWheelAxles;
592+
// public int NumberWheelAxles;
594593

595594
/// <summary>
596595
/// Wheel mass parameter in kilograms
@@ -625,7 +624,7 @@ public float TransmissionEfficiency
625624
/// <summary>
626625
/// Number of drive axles in group of wheels
627626
/// </summary>
628-
public float NumAxles;
627+
public float NumDriveAxles;
629628

630629
/// <summary>
631630
/// Static adhesion coefficient, as given by Curtius-Kniffler formula
@@ -868,8 +867,8 @@ public void Parse(STFReader stf)
868867
case "ortsflangeangle":
869868
WheelFlangeAngleRad = stf.ReadFloatBlock(STFReader.UNITS.Angle, null);
870869
break;
871-
case "ortsnumberwheelaxles":
872-
NumAxles = stf.ReadFloatBlock(STFReader.UNITS.Distance, null);
870+
case "ortsnumberdriveaxles":
871+
NumDriveAxles = stf.ReadFloatBlock(STFReader.UNITS.Distance, null);
873872
break;
874873
case "ortsinertia":
875874
InertiaKgm2 = stf.ReadFloatBlock(STFReader.UNITS.RotationalInertia, null);
@@ -878,9 +877,6 @@ public void Parse(STFReader stf)
878877
WheelWeightKg = stf.ReadFloatBlock(STFReader.UNITS.Mass, null);
879878
AxleWeightN = 9.81f * WheelWeightKg;
880879
break;
881-
case "numberwheelaxles":
882-
NumberWheelAxles = stf.ReadIntBlock(null);
883-
break;
884880
case "animatedparts":
885881
foreach (var part in stf.ReadStringBlock("").ToUpper().Replace(" ", "").Split(','))
886882
{
@@ -897,13 +893,12 @@ public void Copy(Axle other)
897893
{
898894
WheelRadiusM = other.WheelRadiusM;
899895
WheelFlangeAngleRad = other.WheelFlangeAngleRad;
900-
NumAxles = other.NumAxles;
896+
NumDriveAxles = other.NumDriveAxles;
901897
InertiaKgm2 = other.InertiaKgm2;
902898
WheelWeightKg = other.WheelWeightKg;
903899
AxleWeightN = other.AxleWeightN;
904900
AnimatedParts.Clear();
905901
AnimatedParts.AddRange(other.AnimatedParts);
906-
NumberWheelAxles = other.NumberWheelAxles;
907902
}
908903

909904
/// <summary>
@@ -1259,8 +1254,8 @@ public void Update()
12591254
var wheelRadiusMM = Axle.WheelRadiusM * 1000;
12601255
var wheelDistanceGaugeMM = Axle.WheelDistanceGaugeM * 1000;
12611256
var GNm2 = 8.40E+10;
1262-
wheelLoadN = Axle.AxleWeightN / (Axle.NumAxles * 2); // Assume two wheels per axle, and thus wheel weight will be have the value - multiple axles????
1263-
var wheelLoadkN = Axle.AxleWeightN / (Axle.NumAxles * 2 * 1000); // Assume two wheels per axle, and thus wheel weight will be have the value - multiple axles????
1257+
wheelLoadN = Axle.AxleWeightN / (Axle.NumDriveAxles * 2); // Assume two wheels per axle, and thus wheel weight will be have the value - multiple axles????
1258+
var wheelLoadkN = Axle.AxleWeightN / (Axle.NumDriveAxles * 2 * 1000); // Assume two wheels per axle, and thus wheel weight will be have the value - multiple axles????
12641259
var Young_ModulusMPa = 207000;
12651260

12661261
// Calculate Hertzian values - assume 2b = 12mm.

Source/RunActivity/Viewer3D/Popups/HUDWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ static string GetCarWhyteLikeNotation(TrainCar car)
622622
currentCount += 2;
623623
axlesCount += 1;
624624

625-
if (axlesCount >= steamloco.SteamEngines[i].AttachedAxle.NumberWheelAxles && currentCount != 0)
625+
if (axlesCount >= steamloco.SteamEngines[i].AttachedAxle.NumDriveAxles && currentCount != 0)
626626
{
627627
whyte.Add(currentCount.ToString());
628628
currentBogie = axle.BogieIndex;

0 commit comments

Comments
 (0)