You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trace.TraceInformation("Rigid Wheelbase of CarID {0} set to {1} for number of axles {2}",CarID,FormatStrings.FormatVeryShortDistanceDisplay(RigidWheelBaseM,IsMetric),Axles);
861
+
}
862
+
863
+
}
864
+
elseif(Bogies==2)
865
+
{
866
+
if(BogieSize==2)
867
+
{
868
+
if(WagonType==WagonTypes.Passenger)
869
+
{
870
+
RigidWheelBaseM=2.4384f;// Assume a standard 4 wheel passenger bogie (2 axle) wagon - wheel base - 8' (2.4384m)
871
+
}
872
+
else
873
+
{
874
+
RigidWheelBaseM=1.6764f;// Assume a standard 4 wheel freight bogie (2 axle) wagon - wheel base - 5' 6" (1.6764m)
875
+
}
876
+
}
877
+
elseif(BogieSize==3)
878
+
{
879
+
RigidWheelBaseM=3.6576f;// Assume a standard 6 wheel bogie (3 axle) wagon - wheel base - 12' 2" (3.6576m)
Trace.TraceInformation("Rigid Wheelbase of CarID {0} set to {1} for number of axles {2}",CarID,FormatStrings.FormatVeryShortDistanceDisplay(RigidWheelBaseM,IsMetric),BogieSize);
885
+
}
886
+
887
+
}
888
+
}
889
+
elseif(WagonType==WagonTypes.Engine)// if car is a locomotive and either a diesel or electric then determine wheelbase
890
+
{
891
+
if(EngineType!=EngineTypes.Steam)// Assume that it is a diesel or electric locomotive
892
+
{
893
+
if(BogieSize==2)
894
+
{
895
+
RigidWheelBaseM=1.6764f;// Set a default in case no option is found - assume a standard 4 wheel (2 axle) bogie - wheel base - 5' 6" (1.6764m)
896
+
}
897
+
elseif(BogieSize==3)
898
+
{
899
+
RigidWheelBaseM=3.5052f;// Assume a standard 6 wheel bogie (3 axle) locomotive - wheel base - 11' 6" (3.5052m)
Trace.TraceInformation("Rigid Wheelbase of CarID {0} set to {1} for number of axles {2}",CarID,FormatStrings.FormatVeryShortDistanceDisplay(RigidWheelBaseM,IsMetric),BogieSize);
905
+
}
906
+
}
907
+
else// assume steam locomotive
908
+
{
909
+
910
+
if(LocoNumDrvAxles>=Axles)// Test to see if ENG file value is too big (typically doubled)
911
+
{
912
+
LocoNumDrvAxles=LocoNumDrvAxles/2;// Appears this might be the number of wheels rather then the axles.
913
+
}
914
+
915
+
// Approximation for calculating rigid wheelbase for steam locomotives
916
+
// Wheelbase = 1.25 x (Loco Drive Axles - 1.0) x Drive Wheel diameter
Trace.TraceInformation("Rigid Wheelbase of CarID {0} set to {1} for number of axles {2}",CarID,FormatStrings.FormatVeryShortDistanceDisplay(RigidWheelBaseM,IsMetric),LocoNumDrvAxles);
923
+
}
924
+
}
925
+
}
926
+
927
+
RigidWheelBaseInitialised=true;// Don't process again
928
+
}
929
+
832
930
833
931
// Initialise ambient temperatures on first initial loop, then ignore
834
932
if(!AmbientTemperatureInitialised)
@@ -2022,76 +2120,6 @@ public virtual void UpdateCurveForce(float elapsedClockSeconds)
2022
2120
{
2023
2121
if(CurrentCurveRadiusM>0)
2024
2122
{
2025
-
if(RigidWheelBaseM==0)// Calculate default values if no value in Wag File
2026
-
{
2027
-
floatAxles=WheelAxles.Count;
2028
-
floatBogies=Parts.Count-1;
2029
-
floatBogieSize=Axles/Bogies;
2030
-
2031
-
RigidWheelBaseM=1.6764f;// Set a default in case no option is found - assume a standard 4 wheel (2 axle) bogie - wheel base - 5' 6" (1.6764m)
2032
-
2033
-
// Calculate the number of axles in a car
2034
-
2035
-
if(WagonType!=WagonTypes.Engine)// if car is not a locomotive then determine wheelbase
2036
-
{
2037
-
if(Bogies<2)// if less then two bogies assume that it is a fixed wheelbase wagon
2038
-
{
2039
-
if(Axles==2)
2040
-
{
2041
-
RigidWheelBaseM=3.5052f;// Assume a standard 4 wheel (2 axle) wagon - wheel base - 11' 6" (3.5052m)
2042
-
}
2043
-
elseif(Axles==3)
2044
-
{
2045
-
RigidWheelBaseM=3.6576f;// Assume a standard 6 wheel (3 axle) wagon - wheel base - 12' 2" (3.6576m)
2046
-
}
2047
-
}
2048
-
elseif(Bogies==2)
2049
-
{
2050
-
if(Axles==2)
2051
-
{
2052
-
if(WagonType==WagonTypes.Passenger)
2053
-
{
2054
-
RigidWheelBaseM=2.4384f;// Assume a standard 4 wheel passenger bogie (2 axle) wagon - wheel base - 8' (2.4384m)
2055
-
}
2056
-
else
2057
-
{
2058
-
RigidWheelBaseM=1.6764f;// Assume a standard 4 wheel freight bogie (2 axle) wagon - wheel base - 5' 6" (1.6764m)
2059
-
}
2060
-
}
2061
-
elseif(Axles==3)
2062
-
{
2063
-
RigidWheelBaseM=3.6576f;// Assume a standard 6 wheel bogie (3 axle) wagon - wheel base - 12' 2" (3.6576m)
2064
-
}
2065
-
}
2066
-
}
2067
-
if(WagonType==WagonTypes.Engine)// if car is a locomotive and either a diesel or electric then determine wheelbase
2068
-
{
2069
-
if(EngineType!=EngineTypes.Steam)// Assume that it is a diesel or electric locomotive
2070
-
{
2071
-
if(Axles==2)
2072
-
{
2073
-
RigidWheelBaseM=1.6764f;// Set a default in case no option is found - assume a standard 4 wheel (2 axle) bogie - wheel base - 5' 6" (1.6764m)
2074
-
}
2075
-
elseif(Axles==3)
2076
-
{
2077
-
RigidWheelBaseM=3.5052f;// Assume a standard 6 wheel bogie (3 axle) locomotive - wheel base - 11' 6" (3.5052m)
2078
-
}
2079
-
}
2080
-
else// assume steam locomotive
2081
-
{
2082
-
2083
-
if(LocoNumDrvAxles>=Axles)// Test to see if ENG file value is too big (typically doubled)
2084
-
{
2085
-
LocoNumDrvAxles=LocoNumDrvAxles/2;// Appears this might be the number of wheels rather then the axles.
2086
-
}
2087
-
2088
-
// Approximation for calculating rigid wheelbase for steam locomotives
2089
-
// Wheelbase = 1.25 x (Loco Drive Axles - 1.0) x Drive Wheel diameter
0 commit comments