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
Automatic merge of T1.5.1-687-gd279e384a and 10 pull requests
- Pull request #570 at c59c788: Experimental glTF 2.0 support with PBR lighting
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters
- Pull request #865 at 67014b7: Dispatcher window improvements
- Pull request #874 at f8dbeab: Dynamic brake controller refactoring
- Pull request #875 at 43bf33e: Bug fix for https://bugs.launchpad.net/or/+bug/2036346 Player train switching doesn't work with 3D cabs
- Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder
- Pull request #878 at da8978d: Implement Polach Adhesion
- Pull request #882 at e92ff49: Blueprint/train car operations UI window
- Pull request #883 at edcc2dd: SwitchPanel disconnect/connect handling
- Pull request #885 at c81447b: feat: Add notifications to Menu
@@ -724,7 +700,7 @@ public float SlipDerivationPercentpS
724
700
}
725
701
726
702
doubleintegratorError;
727
-
intwaitBeforeIntegreationRate;
703
+
intwaitBeforeChangingRate;
728
704
729
705
/// <summary>
730
706
/// Read/Write relative slip speed warning threshold value, in percent of maximal effective slip
@@ -868,21 +844,23 @@ public void Save(BinaryWriter outf)
868
844
/// <summary>
869
845
/// Integrates the wheel rotation movement using a RK4 method,
870
846
/// calculating the required number of substeps
847
+
/// To maintain the accuracy of the integration method, the number of substeps needs to increase when slip speed approaches the slip threshold speed.
848
+
/// The folloi=wing section attempts to calculate the optimal substep limit. This is a trade off between the accuracy of the slips calculations and the CPU load which impacts the screen FPS
871
849
/// Outputs: wheel speed, wheel angular position and motive force
// this speeds up the substep increase if the slip speed approaches the threshold or has exceeded it, ie "critical conditions".
906
+
NumOfSubstepsPS+=10;
907
+
waitBeforeChangingRate=5;
908
+
}
909
+
else
910
+
{
911
+
// this speeds ups the substeps under "non critical" conditions
912
+
NumOfSubstepsPS+=3;
913
+
waitBeforeChangingRate=30;
914
+
}
915
+
926
916
}
927
917
}
928
918
elseif(targetNumOfSubstepsPS<NumOfSubstepsPS)// decrease sub steps
929
919
{
930
-
if(--waitBeforeIntegreationRate<=0)//wait for a while before changing the integration rate
920
+
if(--waitBeforeChangingRate<=0)//wait for a while before changing the integration rate
931
921
{
932
-
NumOfSubstepsPS-=5;
933
-
waitBeforeIntegreationRate=20;
922
+
NumOfSubstepsPS-=3;
923
+
waitBeforeChangingRate=30;
934
924
}
935
925
}
936
926
927
+
// keeps the substeps to a relevant upper and lower limits
937
928
if(NumOfSubstepsPS<lowerSubStepLimit)
938
929
NumOfSubstepsPS=(int)lowerSubStepLimit;
939
930
@@ -1178,7 +1169,6 @@ public double SlipCharacteristics(double slipSpeedMpS)
1178
1169
}
1179
1170
}
1180
1171
1181
-
1182
1172
/// <summary>
1183
1173
/// Uses the Polach creep force curves calculation described in the following document
1184
1174
/// "Creep forces in simulations of traction vehicles running on adhesion limit" by O. Polach 2005 Wear - http://www.sze.hu/~szenasy/VILLVONT/polachslipvizsg.pdf
0 commit comments