|
18 | 18 | // This file is the responsibility of the 3D & Environment Team.
|
19 | 19 |
|
20 | 20 | #region Design Notes
|
21 |
| -// This is a prototype to evaluate a train forces popup display. The |
22 |
| -// intent is to provide real-time train-handling feeback of the forces |
| 21 | +// The intent is to provide real-time train-handling feeback of the forces |
23 | 22 | // within the train, particularly for long, heavy freight trains. The
|
24 | 23 | // Forces HUD, display or browser, is hard to read for long trains.
|
25 | 24 | // An alternative, better in the long-term, might be an external window
|
26 | 25 | // that provides both in-train and over time feedback, as seen on
|
27 |
| -// professional train simulators. See the discussion in the Elvas tower |
28 |
| -// forum, at: |
29 |
| -// https://www.elvastower.com/forums/index.php?/topic/38056-proposal-for-train-forces-popup-display/ |
| 26 | +// professional train simulators. |
30 | 27 | //
|
31 | 28 | // Coupler Force (longitudinal):
|
32 | 29 | // Shows the length-wise pull or push force at each coupling, as a colored bar graph. Up
|
@@ -103,7 +100,6 @@ public class TrainForcesWindow : Window
|
103 | 100 | private float DerailForceScaleN;
|
104 | 101 |
|
105 | 102 | private static readonly float HighestRealisticBrakeForceN = 2.0e5f; // 45k lbf, used for graph scale only
|
106 |
| - private float LimitForBrakeForceN = HighestRealisticBrakeForceN; |
107 | 103 | private float BrakeForceScaleN;
|
108 | 104 |
|
109 | 105 | private Image[] CouplerForceBarGraph;
|
@@ -342,7 +338,6 @@ private void SetConsistProperties(Train theTrain)
|
342 | 338 | LimitForDerailForceN = lowestDerailForceN;
|
343 | 339 | DerailForceScaleN = lowestDerailForceN * 1.1f;
|
344 | 340 |
|
345 |
| - LimitForBrakeForceN = lowestMaxBrakeForceN; |
346 | 341 | BrakeForceScaleN = lowestMaxBrakeForceN * 1.5f;
|
347 | 342 | }
|
348 | 343 |
|
@@ -423,7 +418,7 @@ private void UpdateBrakeForceImage(TrainCar car, int carPosition)
|
423 | 418 |
|
424 | 419 | if (absForceN > 1000f && BrakeForceScaleN > 1000f) // exclude improbabl values
|
425 | 420 | {
|
426 |
| - // log scale, to be sensitve at small application: 1k lbf, 7%, 146%, 22%, 30%, 39%, 51%, 68%, 100% |
| 421 | + // log scale, to be sensitve at small application: 1k lbf, 7%, 14%, 22%, 30%, 39%, 51%, 68%, 100% |
427 | 422 | var relForce = absForceN / BrakeForceScaleN;
|
428 | 423 | var logForce = (1 / (1 + Math.Pow(10, -1.5f * relForce)) - 0.5f) * 17.05f + 1f;
|
429 | 424 | idx = (int)Math.Floor(logForce);
|
|
0 commit comments