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
if(Simulator.Settings.AdhesionProportionalToWeather&&AdvancedAdhesionModel&&!Simulator.Paused)// Adjust clear weather for precipitation presence - base friction value will be approximately between 0.15 and 0.2
2924
-
// ie base value between 0.8 and 1.0 (TODO)
2925
-
// note lowest friction will be for drizzle rain; friction will increase for precipitation both higher and lower than drizzle rail
2923
+
if(Simulator.Settings.AdhesionProportionalToWeather&&AdvancedAdhesionModel&&!Simulator.Paused)// Adjust clear weather for precipitation presence
2924
+
// ie base value between 60% and 80% (TODO)
2925
+
// note lowest friction will be for drizzle (light) rain; friction will increase for precipitation higher than drizzle rail
// precipitation will calculate a value between 0.15 (light rain) and 0.2 (heavy rain) - this will be a factor that is used to adjust the base value - assume linear value between upper and lower precipitation values
2929
-
if(pric>=0.5)
2930
-
BaseFrictionCoefficientFactor=Math.Min((pric*0.0078f+0.45f),0.8f);// should give a minimum value between 0.8 and 1.0
2931
-
else
2932
-
BaseFrictionCoefficientFactor=Math.Min((0.4539f+1.0922f*(0.5f-pric)),0.8f);// should give a minimum value between 0.8 and 1.0
2928
+
// precipitation will calculate a base coefficient value between 60% (light rain) and 80% (heavy rain) - this will be a factor that is used to adjust the base value - assume linear value between upper and lower precipitation values
2929
+
BaseFrictionCoefficientFactor=Math.Min((pric*0.0078f+0.6f),0.8f);// should give a minimum value between 60% and 80%
2933
2930
}
2934
-
else// if not proportional to precipitation use fixed friction value of 0.8 x friction coefficient of 0.33
2931
+
else// if not proportional to precipitation use fixed friction value of 0.8 x friction coefficient value
2935
2932
{
2936
2933
BaseFrictionCoefficientFactor=0.8f;
2937
2934
}
@@ -2971,14 +2968,14 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds)
2971
2968
floatfog=Simulator.Weather.FogDistance;
2972
2969
if(fog>2000)
2973
2970
{
2974
-
BaseFrictionCoefficientFactor=1.0f;// if fog is not too thick don't change the friction
2971
+
BaseFrictionCoefficientFactor=1.0f;// if fog is not too thick don't change the friction - minimal fog stay at clear adhesion
2975
2972
}
2976
2973
else
2977
2974
{
2978
-
BaseFrictionCoefficientFactor=Math.Min((fog*2.75e-4f+0.8f),0.8f);// If fog is less then 2km then it will impact friction, decrease adhesion by up to 20% (same as clear to wet transition)
2975
+
BaseFrictionCoefficientFactor=Math.Min((fog*2.75e-4f+0.6f),0.8f);// If fog is less then 2km then it will impact friction, decrease adhesion to 60% (same as light rain transition)
2979
2976
}
2980
2977
}
2981
-
else// if not proportional to fog use fixed friction value approximately equal to 0.33, thus factor will be 1.0 x friction coefficient of 0.33
2978
+
else// if not proportional to fog use fixed friction value approximately equal to default 0.33 (will vary if adhesion parameters set), thus factor will be 1.0 x friction coefficient of 0.33
0 commit comments