18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-21 08:35:01 +01:00

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>
This commit is contained in:
maj00r
2026-11-20 03:54:20 +01:00
committed by GitHub
parent 201cae07e1
commit 7524cfbcc2
5 changed files with 48 additions and 31 deletions

View File

@@ -63,7 +63,8 @@ TEST_CASE("uneven track: the cab keeps what the ride on the track doesn't stand
TEST_CASE("uneven track: measures as the Id-14 limits for its value")
{
// appendix 1, class C at 80 km/h: 18 mm vertically, 17 mm sideways, 16 mm of twist on 5 m, gauge +10/-8 mm, 20 mm of cross level, J = 5.3
auto const amplitude{track_uneven::stray_per_mm * 18.0 * 1000.0}; // mm
auto const amplitude{track_uneven::stray_up_per_mm * 18.0 * 1000.0}; // mm
auto const sideways{track_uneven::stray_side_per_mm * 18.0 * 1000.0}; // mm
double const gauge{1.435};
double const step{0.5};
int const steps{4000};
@@ -76,6 +77,7 @@ TEST_CASE("uneven track: measures as the Id-14 limits for its value")
double level{0.0};
double j{0.0};
double away{0.0};
double aside{0.0};
for (int line = 0; line < lines; ++line)
{
auto const heading{glm::pi<double>() * (line + 0.37) / lines};
@@ -85,6 +87,7 @@ TEST_CASE("uneven track: measures as the Id-14 limits for its value")
std::array<std::vector<double>, 2> up;
std::array<std::vector<double>, 2> side;
std::vector<double> middle;
std::vector<double> across_middle;
for (int i = 0; i < steps; ++i)
{
auto const point{start + along * (i * step)};
@@ -93,9 +96,11 @@ TEST_CASE("uneven track: measures as the Id-14 limits for its value")
auto const sign{rail == 0 ? 1.0 : -1.0};
auto const stray{track_uneven::field(point + across * (sign * 0.5 * gauge))};
up[rail].push_back((stray.y - sign * 0.5 * track_uneven::level(point, across)) * amplitude);
side[rail].push_back(glm::dot(stray, across) * amplitude);
side[rail].push_back(glm::dot(stray, across) * sideways);
}
middle.push_back(track_uneven::field(point).y * amplitude);
auto const centre{track_uneven::field(point)};
middle.push_back(centre.y * amplitude);
across_middle.push_back(glm::dot(centre, across) * sideways);
}
std::vector<double> verticals;
std::vector<double> horizontals;
@@ -120,6 +125,7 @@ TEST_CASE("uneven track: measures as the Id-14 limits for its value")
wander += peak(gauges) / lines;
level += peak(levels) / lines;
away += peak(middle) / lines;
aside += peak(across_middle) / lines;
j += (deviation(verticals) + deviation(horizontals) + deviation(twists) + 0.5 * deviation(gauges)) / 3.5 / lines;
}
CHECK(vertical == doctest::Approx(18.0).epsilon(0.1));
@@ -128,7 +134,11 @@ TEST_CASE("uneven track: measures as the Id-14 limits for its value")
CHECK(wander == doctest::Approx(10.0).epsilon(0.2));
CHECK(level == doctest::Approx(20.0).epsilon(0.1));
CHECK(j == doctest::Approx(5.3).epsilon(0.2));
CHECK(away < 40.0); // the long waves go past the 15 mm off the survey marks of appendix 1a
// the long waves go past the 15 mm off the survey marks of appendix 1a: most of the height of a track spectrum is in them, the 10 m chord
// hardly sees them
CHECK(away < 60.0);
// and sideways: about 4.5 cm, which a platform edge or the panels of a level crossing laid on the design are off the rails by
CHECK(aside < 50.0);
}
TEST_CASE("uneven track: a place strays the same every time")
@@ -136,11 +146,11 @@ TEST_CASE("uneven track: a place strays the same every time")
// no random numbers: changing these changes how every uneven track in every scenery looks
glm::dvec3 const place{1234.5, 0.0, -678.9};
auto const stray{track_uneven::field(place)};
CHECK(stray.x == doctest::Approx(0.309777548158).epsilon(1e-9));
CHECK(stray.y == doctest::Approx(0.311350299745).epsilon(1e-9));
CHECK(stray.z == doctest::Approx(-0.328429734019).epsilon(1e-9));
CHECK(track_uneven::level(place, {1.0, 0.0, 0.0}) == doctest::Approx(0.53 * -0.178598957983).epsilon(1e-9));
CHECK(track_uneven::level(place, {0.0, 0.0, 1.0}) == doctest::Approx(0.53 * -0.868291889902).epsilon(1e-9));
CHECK(stray.x == doctest::Approx(0.158385385505).epsilon(1e-9));
CHECK(stray.y == doctest::Approx(0.356190053667).epsilon(1e-9));
CHECK(stray.z == doctest::Approx(0.200372098150).epsilon(1e-9));
CHECK(track_uneven::level(place, {1.0, 0.0, 0.0}) == doctest::Approx(0.35 * -0.178598957983).epsilon(1e-9));
CHECK(track_uneven::level(place, {0.0, 0.0, 1.0}) == doctest::Approx(0.35 * -0.868291889902).epsilon(1e-9));
}
TEST_CASE("uneven track: tracks laid towards each other meet at one cant")