18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-21 21:24:58 +01:00
Commit Graph

5 Commits

Author SHA1 Message Date
maj00r
7524cfbcc2 feat(track): unevenness waves shaped by the track spectra of FRA and ORE B176 (#426)
* feat(track): unevenness waves shaped by the track spectra of FRA and ORE B176

The waves were 5-42 m sideways and 8-83 m vertically, with the long ones
cut down, so a short wavelength carried a large share and the ride and
the rails looked busy. They are now 7-90 m sideways and 8-110 m
vertically, about the bands D1-D3 of EN 13848, each wave standing for a
band of the spectrum S ~ Wc^2 / (W^2 (W^2 + Wc^2)), Wc = 0.8245 rad/m,
the shape the FRA and the ORE B176 (German) spectra share: the longer
a wave, the higher it is.

The "uneven" value keeps its meaning, the peak deviation of a rail on a
10 m chord as PLK Id-14 measures it, so the values in sceneries stay as
they are. Since the chord sees the long waves less, the amplitudes are
calibrated again, and apart for the vertical and the sideways waves:
stray_per_mm becomes stray_up_per_mm 0.00229 and stray_side_per_mm
0.0031, and cross_share 0.35. A track at "uneven 18" measures 18 mm
vertically, 17 sideways, 15 of twist, +-10 of gauge, 21 of cross level
and J 5.7 against the Id-14 limits for 80 km/h. A rail now goes up to
about 5 cm off its design over the long waves, so the bound of the test
goes from 40 to 60 mm; the short waves the cab shakes on are smaller,
the sideways bend under the axles about 30% less.

Every scenery with unevenness looks and rides differently after this.
No release has unevenness yet. The grading tool follows the vertical
waves; on Baltyk the pantograph keeps within 0.6 cm of the wire up to
the product 1150 of the vertical value and the speed (925 before).

* test(track): bound the sideways offset of an uneven track off its design

The longer waves move the track about 4.5 cm sideways off its design at
"uneven 18" (2 cm before), and nothing checked or stated it. The Id-14
test now bounds the peak sideways offset of the middle of the track
below 5 cm, next to the vertical one, so a later change of the shares
can't double it unnoticed. The doc gives the figure, and names platform
edges and level crossing panels among what a rail moves away from.

---------

Co-authored-by: maj00r <maj00r@host>
2026-11-20 03:54:20 +01:00
maj00r
a68c535be9 fix(track): the cab keeps the shake a track doesn't replace, and the editor redraws all that an edit changes
The side sway from the lateral acceleration now goes off only on a track with a sideways value, and the random jolts on one with a vertical or a sideways value. Dips at the rail joints and cross level alone replace neither. On a switch it goes by the path set and what its joined tracks allow.

An edit in the editor also rebuilds the other switches of a joined group with the tracks they meet, and the tracks of a rail run whose joints moved. Removing a track does the same. While dragging, the tracks further off wait until the drag ends.

The clatter of a bogie's axles was right: the followers stand at the pivots and the offsets are the places of the wheel sets. The misleading name goes.

Also what Sonar had left: a parameter as a span, a const method, a struct and its member apart, commented out code, and a function of the grading tool split, with the same output.
2026-11-01 20:12:33 +01:00
maj00r
32fadd634d refactor(tools): the grading tool in smaller functions
As Sonar asks, and a regular expression with no backtracking. The results stay
the same byte for byte on baltyk_skm1, baltyk_cargo, td and lk357.
2026-10-31 20:17:47 +01:00
maj00r
702ab5422e fix(tools): the grading tool reads files with grass in their name
A plain file like baltyk/mod/grass.scm was taken for a plant and never read,
which lost about a quarter of the plants on Baltyk, so overgrown tracks came
out better than they are. The grading is also split into steps.
2026-10-31 19:07:31 +01:00
maj00r
798e8d6a84 feat(tools): grade the tracks of any scenery for the uneven attribute
Usage:

  python tools/track_uneven_grade.py scenery/lk357.scn --out graded
  python tools/track_uneven_grade.py scenery/baltyk_skm1.scn --out graded --route -107,2300 -4120,2491

It follows the includes from a .scn, .scm or .inc, and takes the state of
each track from what the scenery shows: ballast and rail textures, grass
on the track, curves, speed and road crossings. The originals stay as they
are, copies of the files with tracks go to --out, and with no --out it
only reports. Values stay under what a pantograph can follow on those
tracks, by simulation, the rise of the wire itself not counted.

Tracks in .inc files taking parameters are skipped and rotate blocks not
applied, the report says so. See track_uneven_doc.md.
2026-10-31 18:35:00 +01:00