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
Copy file name to clipboardExpand all lines: Source/Orts.Simulation/Simulation/Physics/Train.cs
+30-31
Original file line number
Diff line number
Diff line change
@@ -2205,42 +2205,41 @@ public virtual void physicsUpdate(float elapsedClockSeconds)
2205
2205
public void UpdateWindComponents()
2206
2206
{
2207
2207
// Gets wind direction and speed, and determines HUD display values for the train as a whole.
2208
-
//These will be representative of the train whilst it is on a straight track, but each wagon will vary when going around a curve.
2208
+
//These will be representative of the train whilst it is on a straight track, but each wagon will vary when going around a curve.
2209
2209
// Note both train and wind direction will be positive between 0 (north) and 180 (south) through east, and negative between 0 (north) and 180 (south) through west
2210
2210
// Wind and train direction to be converted to an angle between 0 and 360 deg.
2211
-
// Calculate Wind speed and direction, and train direction
2212
-
// Update the value of the Wind Speed and Direction for the train
// precipitation will calculate a base coefficient value between 60% (light rain) and 90% (heavy rain) - this will be a factor that is used to adjust the base value
3268
3268
// assume linear value between upper and lower precipitation values. Limits are set in the weather module, ie Rain = 0.01ppm (10) and Snow = 0.005ppm (5)
3269
3269
floatprecGrad=(0.2f-0)/(10f-5f);
@@ -3279,7 +3279,7 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds)
3279
3279
}
3280
3280
3281
3281
// Adjust adhesion for impact of fog - default = 20000m = 20km
3282
-
floatfog=Simulator.Weather.FogDistance;
3282
+
floatfog=Simulator.Weather.VisibilityM;
3283
3283
if(fog<20000)// as fog thickens then decrease adhesion
3284
3284
{
3285
3285
fogBaseFrictionCoefficientFactor=Math.Min((fog*2.75e-4f+0.6f),1.0f);// If fog is less then 2km then it will impact friction, decrease adhesion to 60% (same as light rain transition)
0 commit comments