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-351-gc9abcd22b and 8 pull requests
- Pull request #570 at 14abf7a: Experimental glTF 2.0 support with PBR lighting
- Pull request #732 at 1edb2e5: Improvements for air brakes
- Pull request #751 at 00981a2: Web interface to control cab controls with external hardware
- Pull request #767 at 82c5f1c: Refine sunrise and sunset
- Pull request #799 at eb92d81: Consolidated wind simulation
- Pull request #803 at 7157e08: Various adjustments to steam adhesion
- Pull request #809 at f67822a: Some on-screen messages not suppressed, Bug #2008012
- Pull request #813 at a8e9d9b: Refactored garbage generators
Copy file name to clipboardExpand all lines: Source/Orts.Simulation/Simulation/Physics/Train.cs
+7-8
Original file line number
Diff line number
Diff line change
@@ -2111,14 +2111,14 @@ public virtual void physicsUpdate(float elapsedClockSeconds)
2111
2111
public void UpdateWindComponents()
2112
2112
{
2113
2113
// Gets wind direction and speed, and determines HUD display values for the train as a whole.
2114
-
//These will be representative of the train whilst it is on a straight track, but each wagon will vary when going around a curve.
2114
+
//These will be representative of the train whilst it is on a straight track, but each wagon will vary when going around a curve.
2115
2115
// 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
2116
2116
// Wind and train direction to be converted to an angle between 0 and 360 deg.
2117
2117
// Calculate Wind speed and direction, and train direction
2118
2118
// 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
3141
3141
// 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)
3142
3142
floatprecGrad=(0.2f-0)/(10f-5f);
@@ -3152,7 +3152,7 @@ public virtual void UpdateFrictionCoefficient(float elapsedClockSeconds)
3152
3152
}
3153
3153
3154
3154
// Adjust adhesion for impact of fog - default = 20000m = 20km
3155
-
floatfog=Simulator.Weather.FogDistance;
3155
+
floatfog=Simulator.Weather.VisibilityM;
3156
3156
if(fog<20000)// as fog thickens then decrease adhesion
3157
3157
{
3158
3158
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)
// Lateral resistance - due to wheel flange being pushed against rail due to side wind.
2880
2875
// Calculation based upon information provided in AREA 1942 Proceedings - https://archive.org/details/proceedingsofann431942amer - pg 56
2881
2876
2882
-
if(!CarTunnelData.FrontPositionBeyondStartOfTunnel.HasValue&&AbsSpeedMpS>2.2352)// Only calculate wind resistance if option selected in options menu, and not in a tunnel, and speed is sufficient for wind effects (>5mph)
2877
+
// Only calculate wind resistance if option selected in options menu, and not in a tunnel, and speed is sufficient for wind effects (>5mph)
floatTempCombinedDragResistanceForceN=WagonWindResultantSpeedMpS*WagonWindResultantSpeedMpS*DavisCNSSpMM;// R3 of Davis formula taking into account wind
// if this car is a locomotive, but not the lead one then recalculate the resistance with lower C value as drag will not be as high on trailing locomotives
0 commit comments