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
@@ -3186,6 +3189,9 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds)
3186
3189
Train.LocomotiveCoefficientFriction=BaseuMax*BaseFrictionCoefficientFactor*AdhesionMultiplier;// Find friction coefficient factor for locomotive
3187
3190
Train.LocomotiveCoefficientFriction=MathHelper.Clamp(Train.LocomotiveCoefficientFriction,0.05f,0.8f);// Ensure friction coefficient never exceeds a "reasonable" value
3188
3191
3192
+
floatZeroBaseuMax=(Curtius_KnifflerA/(Curtius_KnifflerB)+Curtius_KnifflerC);// Base Curtius - Kniffler equation - u = 0.33, all other values are scaled off this formula
if(axle.AxleWeightN<=0)axle.AxleWeightN=9.81f*locomotive.DrvWheelWeightKg/AxleList.Count;//remains fixed for diesel/electric locomotives, but varies for steam locomotives
// Trace.TraceInformation("Fx Values - a {0} fa1 {1} b {2} fb1 {3} s {4} fs {5} t {6} ft {7} u {8} fu {9} v {10} fv {11} x {12} fx {13} y {14} fy {15} Speed {16} Threshold {17} Fslip {18} SlipSpeed {19}", a, fa1, b, fb1, s, fs, t, ft, u, fu, v, fv, x, fx, y, fy, TrainSpeedMpS, WheelSlipThresholdMpS, fslip, SlipSpeedMpS);
622
+
593
623
}
594
624
595
625
/// <summary>
@@ -752,9 +782,9 @@ public void Restore(BinaryReader inf)
752
782
previousSlipPercent=inf.ReadSingle();
753
783
previousSlipSpeedMpS=inf.ReadSingle();
754
784
AxleForceN=inf.ReadSingle();
755
-
AxleSpeedMpS=inf.ReadSingle();
785
+
AxleSpeedMpS=inf.ReadDouble();
756
786
NumOfSubstepsPS=inf.ReadInt32();
757
-
integratorError=inf.ReadSingle();
787
+
integratorError=inf.ReadDouble();
758
788
}
759
789
760
790
/// <summary>
@@ -955,82 +985,99 @@ public virtual void Update(float timeSpan)
varwheelLoadN=Axle.AxleWeightN/(Axle.NumAxles*2);// Assume two wheels per axle, and thus wheel weight will be have the value - multiple axles????
1020
+
wheelLoadN=Axle.AxleWeightN/(Axle.NumAxles*2);// Assume two wheels per axle, and thus wheel weight will be have the value - multiple axles????
984
1021
varwheelLoadkN=Axle.AxleWeightN/(Axle.NumAxles*2*1000);// Assume two wheels per axle, and thus wheel weight will be have the value - multiple axles????
// calculate "standard" Polach adhesion parameters as straight line approximations as u varies - these values are capped at the moment at the u=0.3 level
1015
1062
// Taking them lower may reduce the stability of the calculations
Copy file name to clipboardExpand all lines: Source/Orts.Simulation/Simulation/RollingStocks/TrainCar.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -638,7 +638,7 @@ public Direction Direction
638
638
protectedintWagonNumAxles;// Number of axles on a wagon
639
639
protectedintInitWagonNumAxles;// Initial read of number of axles on a wagon
640
640
protectedfloatMSTSWagonNumWheels;// Number of axles on a wagon - used to read MSTS value as default
641
-
protectedintLocoNumDrvAxles;// Number of drive axles on locomotive
641
+
publicintLocoNumDrvAxles;// Number of drive axles on locomotive
642
642
protectedfloatMSTSLocoNumDrvWheels;// Number of drive axles on locomotive - used to read MSTS value as default
643
643
publicfloatDriverWheelRadiusM=Me.FromIn(30.0f);// Drive wheel radius of locomotive wheels - Wheel radius of loco drive wheels can be anywhere from about 10" to 40".
0 commit comments