@@ -143,6 +143,7 @@ public class MSTSWagon : TrainCar
143
143
public float WheelSpeedMpS ;
144
144
public float WheelSpeedSlipMpS ; // speed of wheel if locomotive is slipping
145
145
public float SlipWarningThresholdPercent = 70 ;
146
+ public float NumWheelsBrakingFactor = 4 ; // MSTS braking factor loosely based on the number of braked wheels. Not used yet.
146
147
public MSTSNotchController WeightLoadController ; // Used to control freight loading in freight cars
147
148
public float AbsWheelSpeedMpS ; // Math.Abs(WheelSpeedMpS) is used frequently in the subclasses, maybe it's more efficient to compute it once
148
149
@@ -472,24 +473,6 @@ public virtual void LoadFromWagFile(string wagFilePath)
472
473
CentreOfGravityM = InitialCentreOfGravityM ;
473
474
IsDavisFriction = DavisAN != 0 && DavisBNSpM != 0 && DavisCNSSpMM != 0 ; // test to see if OR thinks that Davis Values have been entered in WG file.
474
475
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
-
493
476
if ( FreightAnimations != null )
494
477
{
495
478
foreach ( var ortsFreightAnim in FreightAnimations . Animations )
@@ -929,9 +912,6 @@ public virtual void Parse(string lowercasetoken, STFReader stf)
929
912
CarLengthM = stf . ReadFloat ( STFReader . UNITS . Distance , null ) ;
930
913
stf . SkipRestOfBlock ( ) ;
931
914
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 ;
935
915
case "wagon(ortstrackgauge" :
936
916
stf . MustMatch ( "(" ) ;
937
917
TrackGaugeM = stf . ReadFloat ( STFReader . UNITS . Distance , null ) ;
@@ -969,7 +949,7 @@ public virtual void Parse(string lowercasetoken, STFReader stf)
969
949
case "wagon(ortsheatingwindowderatingfactor" : WindowDeratingFactor = stf . ReadFloatBlock ( STFReader . UNITS . None , null ) ; break ;
970
950
case "wagon(ortsheatingcompartmenttemperatureset" : DesiredCompartmentTempSetpointC = stf . ReadFloatBlock ( STFReader . UNITS . Temperature , null ) ; break ; // Temperature conversion is incorrect - to be checked!!!
971
951
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 ;
973
953
case "wagon(ortsheatingtrainpipeinnerdiameter" : MainSteamHeatPipeInnerDiaM = stf . ReadFloatBlock ( STFReader . UNITS . Distance , null ) ; break ;
974
954
case "wagon(ortsheatingconnectinghoseinnerdiameter" : CarConnectSteamHoseInnerDiaM = stf . ReadFloatBlock ( STFReader . UNITS . Distance , null ) ; break ;
975
955
case "wagon(ortsheatingconnectinghoseouterdiameter" : CarConnectSteamHoseOuterDiaM = stf . ReadFloatBlock ( STFReader . UNITS . Distance , null ) ; break ;
@@ -1208,9 +1188,7 @@ public virtual void Parse(string lowercasetoken, STFReader stf)
1208
1188
break ;
1209
1189
case "wagon(inside" : HasInsideView = true ; ParseWagonInside ( stf ) ; break ;
1210
1190
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 ;
1214
1192
case "wagon(ortspantographs" :
1215
1193
Pantographs . Parse ( lowercasetoken , stf ) ;
1216
1194
break ;
@@ -1277,11 +1255,6 @@ public virtual void Copy(MSTSWagon copy)
1277
1255
InitialCentreOfGravityM = copy . InitialCentreOfGravityM ;
1278
1256
UnbalancedSuperElevationM = copy . UnbalancedSuperElevationM ;
1279
1257
RigidWheelBaseM = copy . RigidWheelBaseM ;
1280
- WagonNumAxles = copy . WagonNumAxles ;
1281
- WagonNumBogies = copy . WagonNumBogies ;
1282
- CarBogieCentreLengthM = copy . CarBogieCentreLengthM ;
1283
- CarBodyLengthM = copy . CarBodyLengthM ;
1284
- CarCouplerFaceLengthM = copy . CarCouplerFaceLengthM ;
1285
1258
AuxTenderWaterMassKG = copy . AuxTenderWaterMassKG ;
1286
1259
MassKG = copy . MassKG ;
1287
1260
InitialMassKG = copy . InitialMassKG ;
@@ -1296,7 +1269,7 @@ public virtual void Copy(MSTSWagon copy)
1296
1269
WindowDeratingFactor = copy . WindowDeratingFactor ;
1297
1270
DesiredCompartmentTempSetpointC = copy . DesiredCompartmentTempSetpointC ;
1298
1271
CompartmentHeatingPipeAreaFactor = copy . CompartmentHeatingPipeAreaFactor ;
1299
- BodyPipeOverhangDistanceM = copy . BodyPipeOverhangDistanceM ;
1272
+ MainSteamHeatPipeOuterDiaM = copy . MainSteamHeatPipeOuterDiaM ;
1300
1273
MainSteamHeatPipeInnerDiaM = copy . MainSteamHeatPipeInnerDiaM ;
1301
1274
CarConnectSteamHoseInnerDiaM = copy . CarConnectSteamHoseInnerDiaM ;
1302
1275
CarConnectSteamHoseOuterDiaM = copy . CarConnectSteamHoseOuterDiaM ;
0 commit comments