Skip to content

Commit f70d0aa

Browse files
committed
Merge branch 'master' into add-menu-notifications
2 parents d9ce84b + 4cad067 commit f70d0aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+12675
-10067
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,4 +365,5 @@ ASALocalRun/
365365
healthchecksdb
366366

367367
# Backup folder for Package Reference Convert tool in Visual Studio 2017
368-
MigrationBackup/
368+
MigrationBackup/
369+
/Source/RunActivity/Properties/launchSettings.json

Docs/Architecture.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,29 @@
11
# Open Rails Architecture
22

3-
This document will describe the overall structure of Open Rails and how we expect different areas of the program to work together.
3+
This document describes the overall structure of Open Rails and how we expect different areas of the program to work together.
4+
5+
## Player application model
6+
7+
The player application model describes the desired components and their relationships which make up Open Rails. Each of these will be formed from one or more libraries, as needed, and each library may contain distinct but critically linked subfunctions.
8+
9+
```mermaid
10+
flowchart TB
11+
Formats["Orts.Formats"]
12+
Game["Orts.Game"]
13+
Input["Orts.Input"]
14+
Multiplayer["Orts.Multiplayer"]
15+
Parsers["Orts.Parsers"]
16+
Player["Player"]
17+
Simulation["Orts.Simulation"]
18+
Sound["Orts.Sound"]
19+
UI["Orts.UI"]
20+
Viewer["Orts.Viewer"]
21+
Web["Orts.Web"]
22+
Player --- Game --- UI --- Viewer --- Simulation & Formats
23+
Player --- Input --- UI & Simulation
24+
Sound --- Simulation --- Formats & Multiplayer & Web
25+
Formats --- Parsers
26+
```
427

528
## Threading model
629

@@ -29,6 +52,22 @@ The threading in Open Rails has two key threads working together (Render and Upd
2952
- Web Server process
3053
- Handle all web and API requests
3154

55+
## Projects, assemblies, namespaces
56+
57+
Open Rails is made up of several component projects which are organised into subdirectories with the following naming pattern:
58+
59+
- `Orts.Component\Orts.Component.csproj` (project file)
60+
- `Orts.Component.dll` (assembly name)
61+
- `Orts.Component` (default namespace)
62+
63+
The namespaces used within code files should match the directory structure like this:
64+
65+
| *Filename* | *Namespace*
66+
|---|---|
67+
| `Orts.Component\File.cs` | `Orts.Component` |
68+
| `Orts.Component\Section\File.cs` | `Orts.Component.Section` |
69+
| `Orts.Component\Section\Subsection\File.cs` | `Orts.Component.Section.Subsection` |
70+
3271
## Simulator object relationships
3372

3473
This tree is a summary of the important object relationships (aggregation) inside the simulation. Each entry is a class whose instances can be accessed from the parent item.

Docs/Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Open Rails is a free train simulator supporting the world's largest range of dig
1010
## Documentation
1111

1212
* [Read the FAQ](http://www.openrails.org/learn/faq/?utm_campaign=documentation&utm_source=readme&utm_medium=referral)
13-
* [Read the manual online](https://open-rails.readthedocs.io/en/1.3.1/) or the PDF included with the program, found in the main menu under "Documents"
13+
* [Read the manual online](https://open-rails.readthedocs.io/en/latest/) or the PDF included with the program, found in the main menu under "Documents"
1414
* [Get additional materials, including tutorials, from our website](http://www.openrails.org/learn/manual-and-tutorials/?utm_campaign=documentation&utm_source=readme&utm_medium=referral)
1515
* [Read more about the project on our website](http://www.openrails.org/discover/open-rails/?utm_campaign=documentation&utm_source=readme&utm_medium=referral)
1616

Source/Documentation/Manual/physics.rst

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,23 @@ simplicity, only one axle model is computed (and animated). A tilting
254254
feature and the independent axle adhesion model will be introduced in the
255255
future.
256256

257-
The heart of the model is the slip characteristics (picture below).
257+
The advanced adhesion model uses two alternate algorithms to calculate the
258+
wheel adhesion. The first model is based upon an algorithm by Pacha, whilst the second
259+
uses an algorithm developed by Polach. The Polach algorithm provides
260+
a more accurate outcome and facilitates the future inclusion of track conditions.
261+
However due to the number of algorithm steps required to calculate the wheel adhesion
262+
value, it is more CPU load intensive then the Pacha one. This can produce low
263+
frame rates for the screen display in machines with low performance specifications.
264+
265+
Hence OR automatically senses the CPU load, and switches to the Pacha algorithm at
266+
high loads and to the Polach algorithm under lower CPU loads. In this way OR attempts
267+
to support the operation of lower specification computers. When OR is using the
268+
Pacha algorithm, the "Wheel Adh (Max)" values will both read 99%, whereas when the
269+
Polach algorithm is being used these values will be around the expected values of 30-55%.
270+
271+
272+
273+
The heart of the adhesion algorithm is the slip characteristics (pictured below).
258274

259275
.. image:: images/physics-adhesion-slip.png
260276
:align: center
@@ -2689,6 +2705,12 @@ Brake Token: ``TrainBrakesControllerSupressionStart``
26892705
- Brake Systems: Air single pipe, Air twin pipe, EP
26902706
- Description: Cancels effect of penalty brake application by TCS and restores control of brakes to driver.
26912707

2708+
Brake Position Labels
2709+
----------------------
2710+
The name of a given brake controller notch can be customized by adding an ORTSLabel
2711+
block to the notch definition::
2712+
2713+
Notch ( 0.5 0 TrainBrakesControllerEPFullServiceStart ORTSLabel ( "Regeneration III and EP" ) )
26922714

26932715
.. _physics-hud-brake:
26942716

@@ -2951,7 +2973,7 @@ DynamicBrakeForceCurves defined in the ENG file, than one is created
29512973
based on the MSTS parameter values.
29522974

29532975
It is possible to use dynamic brakes as a replacement for air brakes
2954-
when they are available (dynamic brake blending). During blending operation,
2976+
when they are available ("local" dynamic brake blending). During blending operation,
29552977
the following parameters will adjust the behaviour of air brakes:
29562978

29572979
.. index::
@@ -2964,7 +2986,38 @@ the following parameters will adjust the behaviour of air brakes:
29642986
air brakes are released while dynamic brakes satisfy the train brake demand.
29652987
If dynamic braking is not sufficient, air brakes will be partially applied
29662988
so the combination air+dynamic provides the required brake demand.
2967-
2989+
2990+
Sometimes the train brake controller is capable to apply the dynamic
2991+
brakes for the whole consist, usually as a first step before air brakes
2992+
are applied. This is usually known as "train blending", as opposed to
2993+
"local" blending which only affects dynamic braking on the locomotive itself.
2994+
A blending table which looks similar to the DynamicBrakeForceCurves table is
2995+
available. It specifies the amount of dynamic brake that is applied at each
2996+
notch of the train brake controller, where 0 means no dynamic brake and 1 means full dynamic brake::
2997+
Engine(
2998+
ORTSTrainDynamicBlendingTable(
2999+
comment ( Notch 0 of train brake - no dynamic brake applied )
3000+
0 (
3001+
0 0
3002+
300km/h 0
3003+
)
3004+
comment ( 30% of Train brake - apply full dynamic brake )
3005+
0.3 (
3006+
0 1
3007+
300km/h 1
3008+
)
3009+
comment ( 90% of Train brake - still apply full dynamic brake )
3010+
0.9 (
3011+
0 1
3012+
300km/h 1
3013+
)
3014+
comment ( Emergency brake notch - do not command dynamic brake )
3015+
1 (
3016+
0 0
3017+
300km/h 0
3018+
)
3019+
)
3020+
)
29683021

29693022
Native Open Rails Braking Parameters
29703023
------------------------------------

0 commit comments

Comments
 (0)