|
37 | 37 | using Orts.Common;
|
38 | 38 | using Orts.Formats.Msts;
|
39 | 39 | using Orts.Parsers.Msts;
|
40 |
| -using Orts.Simulation.AIs; |
41 | 40 | using Orts.Simulation.Physics;
|
42 | 41 | using Orts.Simulation.RollingStocks.Coupling;
|
43 | 42 | using Orts.Simulation.RollingStocks.SubSystems;
|
44 | 43 | using Orts.Simulation.RollingStocks.SubSystems.Brakes;
|
45 | 44 | using Orts.Simulation.RollingStocks.SubSystems.PowerSupplies;
|
46 | 45 | using Orts.Simulation.Signalling;
|
47 |
| -using Orts.Simulation.Timetables; |
48 | 46 | using ORTS.Common;
|
49 | 47 | using ORTS.Scripting.Api;
|
50 | 48 | using System;
|
@@ -2076,14 +2074,13 @@ public virtual void UpdateCurveForce(float elapsedClockSeconds)
|
2076 | 2074 | // Base Curve Resistance (from refernce i)) = (Vehicle mass x Coeff Friction) * (Track Gauge + Vehicle Fixed Wheelbase) / (2 * curve radius)
|
2077 | 2075 | // Vehicle Fixed Wheel base is the distance between the wheels, ie bogie or fixed wheels
|
2078 | 2076 |
|
2079 |
| - var rBaseWagonN = 9.81f * MassKG * Train.WagonCoefficientFriction * (TrackGaugeM + RigidWheelBaseM) / (2.0f * CurrentCurveRadiusM); |
| 2077 | + float rBaseWagonN = GravitationalAccelerationMpS2 * MassKG * Train.WagonCoefficientFriction * (TrackGaugeM + RigidWheelBaseM) / (2.0f * CurrentCurveRadiusM); |
2080 | 2078 |
|
2081 | 2079 | // Speed Curve Resistance (from reference ii) - second term only) = ((Speed^2 / Curve Radius) - (Superelevation / Track Gauge) * Gravitational acceleration) * Constant
|
2082 | 2080 |
|
2083 |
| - var speedConstant = 1.5f; |
2084 |
| - var MToMM = 1000; |
2085 |
| - var rspeedKgpTonne = speedConstant * Math.Abs((SpeedMpS * SpeedMpS / CurrentCurveRadiusM) - ((MToMM * SuperElevationM / MToMM * TrackGaugeM) * GravitationalAccelerationMpS2)); |
2086 |
| - var rSpeedWagonN = GravitationalAccelerationMpS2 * (Kg.ToTonne(MassKG) * rspeedKgpTonne); |
| 2081 | + float speedConstant = 1.5f; |
| 2082 | + float rspeedKgpTonne = speedConstant * Math.Abs((SpeedMpS * SpeedMpS / CurrentCurveRadiusM) - (GravitationalAccelerationMpS2 * SuperElevationM / TrackGaugeM)); |
| 2083 | + float rSpeedWagonN = GravitationalAccelerationMpS2 * (Kg.ToTonne(MassKG) * rspeedKgpTonne); |
2087 | 2084 |
|
2088 | 2085 | CurveForceN = rBaseWagonN + rSpeedWagonN;
|
2089 | 2086 | }
|
|
0 commit comments