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
publicfloatIsTenderRequired=1.0f;// Flag indicates that a tender is required for operation of the locomotive. Typically tank locomotives do not require a tender. Assume by default that tender is required.
@@ -239,10 +249,11 @@ public enum SlipControlType
239
249
240
250
// parameters for Track Sander based upon compressor air and abrasive table for 1/2" sand blasting nozzle @ 50psi
241
251
publicfloatMaxTrackSandBoxCapacityM3=Me3.FromFt3(40.0f);// Capacity of sandbox - assume 40.0 cu ft
242
-
publicfloatCurrentTrackSandBoxCapacityM3=5.0f;// This value needs to be initialised to the value above, as it reduces as sand is used.
252
+
publicfloatCurrentTrackSandBoxCapacityM3;
243
253
publicfloatTrackSanderAirComsumptionM3pS=Me3.FromFt3(195.0f)/60.0f;// Default value - cubic feet per min (CFM) 195 ft3/m
244
254
publicfloatTrackSanderAirPressurePSI=50.0f;
245
255
publicfloatTrackSanderSandConsumptionM3pS=Me3.FromFt3(11.6f)/3600.0f;// Default value - 11.6 ft3/h
256
+
publicfloatSandWeightKgpM3=1600;// One cubic metre of sand weighs about 1.54-1.78 tonnes.
// Test to determine whether to use Polach or Pacha adhesion
958
-
varScreenFrameRate=Simulator.SmoothedFrameRate;
959
-
960
-
// Switches between Polach (high performance) adhesion model and Pacha (low performance) adhesion model
961
-
if(ScreenFrameRate>59)
958
+
959
+
// Switches between Polach (high performance) adhesion model and Pacha (low performance) adhesion model depending upon the PC performance
960
+
if(timeSpan<0.025)// timespan 0.025 = 40 fps screen rate, low timeSpan and high FPS
962
961
{
963
962
UsePolachAdhesion=true;
964
963
}
965
-
elseif(ScreenFrameRate<55)
964
+
elseif(timeSpan>0.033)// timespan 0.033 = 30 fps screen rate, high timeSpan and low FPS
966
965
{
967
966
UsePolachAdhesion=false;
968
967
if(TrainSpeedMpS>0)
969
968
{
969
+
varScreenFrameRate=1/timeSpan;
970
970
Trace.TraceInformation("Advanced adhesion model switched to low performance option due to low frame rate {0} at ElapsedClockSeconds of {1}",ScreenFrameRate,timeSpan);
0 commit comments