Skip to content

Commit a939764

Browse files
committed
Revert "Add derail coefficient."
This reverts commit 632cf03.
1 parent c9bd9e3 commit a939764

File tree

4 files changed

+79
-165
lines changed

4 files changed

+79
-165
lines changed

Source/Orts.Simulation/Simulation/Physics/Train.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2218,7 +2218,7 @@ public void UpdateCarSteamHeat(float elapsedClockSeconds)
22182218

22192219
// Calculate Length of carriage and heat loss in main steam pipe
22202220
float CarMainSteamPipeTempF = mstsLocomotive.SteamHeatPressureToTemperaturePSItoF[car.CarSteamHeatMainPipeSteamPressurePSI];
2221-
car.CarHeatSteamMainPipeHeatLossBTU = Me.ToFt(car.CarLengthM) * (MathHelper.Pi * Me.ToFt(car.BodyPipeOverhangDistanceM)) * HeatTransCoeffMainPipeBTUpFt2pHrpF * (CarMainSteamPipeTempF - C.ToF(car.CarOutsideTempC));
2221+
car.CarHeatSteamMainPipeHeatLossBTU = Me.ToFt(car.CarLengthM) * (MathHelper.Pi * Me.ToFt(car.MainSteamHeatPipeOuterDiaM)) * HeatTransCoeffMainPipeBTUpFt2pHrpF * (CarMainSteamPipeTempF - C.ToF(car.CarOutsideTempC));
22222222

22232223
// calculate steam connecting hoses heat loss - assume 1.5" hose
22242224
float ConnectSteamHoseOuterDiaFt = Me.ToFt(car.CarConnectSteamHoseOuterDiaM);

Source/Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ public class MSTSWagon : TrainCar
143143
public float WheelSpeedMpS;
144144
public float WheelSpeedSlipMpS; // speed of wheel if locomotive is slipping
145145
public float SlipWarningThresholdPercent = 70;
146+
public float NumWheelsBrakingFactor = 4; // MSTS braking factor loosely based on the number of braked wheels. Not used yet.
146147
public MSTSNotchController WeightLoadController; // Used to control freight loading in freight cars
147148
public float AbsWheelSpeedMpS; // Math.Abs(WheelSpeedMpS) is used frequently in the subclasses, maybe it's more efficient to compute it once
148149

@@ -472,24 +473,6 @@ public virtual void LoadFromWagFile(string wagFilePath)
472473
CentreOfGravityM = InitialCentreOfGravityM;
473474
IsDavisFriction = DavisAN != 0 && DavisBNSpM != 0 && DavisCNSSpMM != 0; // test to see if OR thinks that Davis Values have been entered in WG file.
474475

475-
// Initialise car body lengths. Assume overhang is 2.0m each end, and bogie centres are the car length minus this value
476-
477-
478-
if (CarCouplerFaceLengthM == 0)
479-
{
480-
CarCouplerFaceLengthM = CarLengthM;
481-
}
482-
483-
if (CarBodyLengthM == 0)
484-
{
485-
CarBodyLengthM = CarCouplerFaceLengthM - 0.8f;
486-
}
487-
488-
if (CarBogieCentreLengthM == 0)
489-
{
490-
CarBogieCentreLengthM = (CarCouplerFaceLengthM - 4.3f);
491-
}
492-
493476
if (FreightAnimations != null)
494477
{
495478
foreach (var ortsFreightAnim in FreightAnimations.Animations)
@@ -929,9 +912,6 @@ public virtual void Parse(string lowercasetoken, STFReader stf)
929912
CarLengthM = stf.ReadFloat(STFReader.UNITS.Distance, null);
930913
stf.SkipRestOfBlock();
931914
break;
932-
case "wagon(ortslengthbogiecentre": CarBogieCentreLengthM = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); break;
933-
case "wagon(ortslengthcarbody": CarBodyLengthM = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); break;
934-
case "wagon(ortslengthcouplerface": CarCouplerFaceLengthM = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); break;
935915
case "wagon(ortstrackgauge":
936916
stf.MustMatch("(");
937917
TrackGaugeM = stf.ReadFloat(STFReader.UNITS.Distance, null);
@@ -969,7 +949,7 @@ public virtual void Parse(string lowercasetoken, STFReader stf)
969949
case "wagon(ortsheatingwindowderatingfactor": WindowDeratingFactor = stf.ReadFloatBlock(STFReader.UNITS.None, null); break;
970950
case "wagon(ortsheatingcompartmenttemperatureset": DesiredCompartmentTempSetpointC = stf.ReadFloatBlock(STFReader.UNITS.Temperature, null); break; // Temperature conversion is incorrect - to be checked!!!
971951
case "wagon(ortsheatingcompartmentpipeareafactor": CompartmentHeatingPipeAreaFactor = stf.ReadFloatBlock(STFReader.UNITS.None, null); break;
972-
case "wagon(ortsheatingtrainpipeouterdiameter": BodyPipeOverhangDistanceM = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); break;
952+
case "wagon(ortsheatingtrainpipeouterdiameter": MainSteamHeatPipeOuterDiaM = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); break;
973953
case "wagon(ortsheatingtrainpipeinnerdiameter": MainSteamHeatPipeInnerDiaM = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); break;
974954
case "wagon(ortsheatingconnectinghoseinnerdiameter": CarConnectSteamHoseInnerDiaM = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); break;
975955
case "wagon(ortsheatingconnectinghoseouterdiameter": CarConnectSteamHoseOuterDiaM = stf.ReadFloatBlock(STFReader.UNITS.Distance, null); break;
@@ -1208,9 +1188,7 @@ public virtual void Parse(string lowercasetoken, STFReader stf)
12081188
break;
12091189
case "wagon(inside": HasInsideView = true; ParseWagonInside(stf); break;
12101190
case "wagon(orts3dcab": Parse3DCab(stf); break;
1211-
case "wagon(numwheels": WagonNumAxles = stf.ReadFloatBlock(STFReader.UNITS.None, 4.0f); break;
1212-
case "wagon(ortsnumaxles": WagonNumAxles = stf.ReadFloatBlock(STFReader.UNITS.None, 4.0f); break;
1213-
case "wagon(ortsnumbogies": WagonNumBogies = stf.ReadFloatBlock(STFReader.UNITS.None, 4.0f); break;
1191+
case "wagon(numwheels": NumWheelsBrakingFactor = stf.ReadFloatBlock(STFReader.UNITS.None, 4.0f); break;
12141192
case "wagon(ortspantographs":
12151193
Pantographs.Parse(lowercasetoken, stf);
12161194
break;
@@ -1277,11 +1255,6 @@ public virtual void Copy(MSTSWagon copy)
12771255
InitialCentreOfGravityM = copy.InitialCentreOfGravityM;
12781256
UnbalancedSuperElevationM = copy.UnbalancedSuperElevationM;
12791257
RigidWheelBaseM = copy.RigidWheelBaseM;
1280-
WagonNumAxles = copy.WagonNumAxles;
1281-
WagonNumBogies = copy.WagonNumBogies;
1282-
CarBogieCentreLengthM = copy.CarBogieCentreLengthM;
1283-
CarBodyLengthM = copy.CarBodyLengthM;
1284-
CarCouplerFaceLengthM = copy.CarCouplerFaceLengthM;
12851258
AuxTenderWaterMassKG = copy.AuxTenderWaterMassKG;
12861259
MassKG = copy.MassKG;
12871260
InitialMassKG = copy.InitialMassKG;
@@ -1296,7 +1269,7 @@ public virtual void Copy(MSTSWagon copy)
12961269
WindowDeratingFactor = copy.WindowDeratingFactor;
12971270
DesiredCompartmentTempSetpointC = copy.DesiredCompartmentTempSetpointC;
12981271
CompartmentHeatingPipeAreaFactor = copy.CompartmentHeatingPipeAreaFactor;
1299-
BodyPipeOverhangDistanceM = copy.BodyPipeOverhangDistanceM;
1272+
MainSteamHeatPipeOuterDiaM = copy.MainSteamHeatPipeOuterDiaM;
13001273
MainSteamHeatPipeInnerDiaM = copy.MainSteamHeatPipeInnerDiaM;
13011274
CarConnectSteamHoseInnerDiaM = copy.CarConnectSteamHoseInnerDiaM;
13021275
CarConnectSteamHoseOuterDiaM = copy.CarConnectSteamHoseOuterDiaM;

0 commit comments

Comments
 (0)