Skip to content

Commit 24e5fd0

Browse files
committed
Adjust axles
1 parent 04b214b commit 24e5fd0

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
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.NumDriveAxles); // Calculate the weight per axle (used in MSTSLocomotive for friction calculatons)
2555+
SteamDrvWheelWeightLbs += Kg.ToLb(SteamEngines[i].AttachedAxle.WheelWeightKg / SteamEngines[i].AttachedAxle.NumWheelsetAxles); // 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.NumDriveAxles;
6335+
TotalWheelMomentofInertia *= linkedEngine.AttachedAxle.NumWheelsetAxles;
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: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ 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.NumDriveAxles <= 0) axle.NumDriveAxles = locomotive.LocoNumDrvAxles;
238+
if (axle.NumWheelsetAxles <= 0) axle.NumWheelsetAxles = 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;
@@ -545,9 +545,9 @@ public float TransmissionEfficiency
545545
public float BogieRigidWheelBaseM;
546546

547547
/// <summary>
548-
/// Number of drive axles in group of wheels
548+
/// Number of axles in group of wheels, in some instance this might be a mix of drive and non-drive axles
549549
/// </summary>
550-
public float NumDriveAxles;
550+
public float NumWheelsetAxles;
551551

552552
/// <summary>
553553
/// Static adhesion coefficient, as given by Curtius-Kniffler formula
@@ -790,8 +790,8 @@ public void Parse(STFReader stf)
790790
case "ortsflangeangle":
791791
WheelFlangeAngleRad = stf.ReadFloatBlock(STFReader.UNITS.Angle, null);
792792
break;
793-
case "ortsnumberdriveaxles":
794-
NumDriveAxles = stf.ReadFloatBlock(STFReader.UNITS.Distance, null);
793+
case "numberwheelsetaxles":
794+
NumWheelsetAxles = stf.ReadFloatBlock(STFReader.UNITS.Distance, null);
795795
break;
796796
case "ortsinertia":
797797
InertiaKgm2 = stf.ReadFloatBlock(STFReader.UNITS.RotationalInertia, null);
@@ -816,7 +816,7 @@ public void Copy(Axle other)
816816
{
817817
WheelRadiusM = other.WheelRadiusM;
818818
WheelFlangeAngleRad = other.WheelFlangeAngleRad;
819-
NumDriveAxles = other.NumDriveAxles;
819+
NumWheelsetAxles = other.NumWheelsetAxles;
820820
InertiaKgm2 = other.InertiaKgm2;
821821
WheelWeightKg = other.WheelWeightKg;
822822
AxleWeightN = other.AxleWeightN;
@@ -1227,8 +1227,8 @@ public void Update()
12271227
var wheelRadiusMM = Axle.WheelRadiusM * 1000;
12281228
var wheelDistanceGaugeMM = Axle.WheelDistanceGaugeM * 1000;
12291229
var GNm2 = 8.40E+10;
1230-
wheelLoadN = Axle.AxleWeightN / (Axle.NumDriveAxles * 2); // Assume two wheels per axle, and thus wheel weight will be have the value - multiple axles????
1231-
var wheelLoadkN = Axle.AxleWeightN / (Axle.NumDriveAxles * 2 * 1000); // Assume two wheels per axle, and thus wheel weight will be have the value - multiple axles????
1230+
wheelLoadN = Axle.AxleWeightN / (Axle.NumWheelsetAxles * 2); // Assume two wheels per axle, and thus wheel weight will be have the value - multiple axles????
1231+
var wheelLoadkN = Axle.AxleWeightN / (Axle.NumWheelsetAxles * 2 * 1000); // Assume two wheels per axle, and thus wheel weight will be have the value - multiple axles????
12321232
var Young_ModulusMPa = 207000;
12331233

12341234
// 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.NumDriveAxles && currentCount != 0)
625+
if (axlesCount >= steamloco.SteamEngines[i].AttachedAxle.NumWheelsetAxles && currentCount != 0)
626626
{
627627
whyte.Add(currentCount.ToString());
628628
currentBogie = axle.BogieIndex;

0 commit comments

Comments
 (0)