mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-02 06:59:13 +01:00
feat(editor): the whole-scenery grade fit keeps the tracks a station shares at one height, lets the switches lie on the vertical curves the regulation allows, runs straight through the double slips and leaves the bridges out of the faults
A switch may lie on a concave vertical curve, and on a convex one no sharper than 2000 m (Dz.U. 2026 poz. 1225 § 58 ust. 16): the fit bends over the switches and their shared timbers where the ground does, a curve on a switch is a warning, and only a sharper convex one an error. A sharp crest of a hump keeps its curve off the switch zones. The zone of a crossing reaches only as far as the path crossed has rails, so the middle of a double slip keeps to itself. A line runs through a switch along its main path, and through the quarters of a double slip straight on, so the long lines go through the slips and the connections between them are fitted after. Rails of the lines fitted already nearer than a sleeper is long are taken at their height, as both lie on the same timbers. A short line between two lines whose end grades can't be joined within the norms keeps only the heights of its ends, and the grade breaks at the joints. The norms speed of a line is the one most of its length is laid for, so a few tracks set much faster don't stiffen the curves of all of it. The fault finder leaves out the places over the terrain model on a bridge or a viaduct, the ground falling away under them by the abutments. A formation modifier may be open at its start or end.
This commit is contained in:
@@ -82,14 +82,6 @@ double nice_step(double const Approximate)
|
||||
return power * 10.0;
|
||||
}
|
||||
|
||||
double route_speed(editor_track::route const &Route)
|
||||
{
|
||||
double speed{-1.0};
|
||||
for (auto const &span : Route.spans)
|
||||
speed = std::max(speed, editor_track::velocity(*span.track));
|
||||
return speed > 0.0 ? speed : 100.0;
|
||||
}
|
||||
|
||||
std::string const kProfileMark{"//$p"};
|
||||
|
||||
profile::line reversed_line(profile::line Line, double const Length)
|
||||
@@ -915,7 +907,7 @@ void editor_mode::profile_recognize()
|
||||
auto const norms{state.line.norms};
|
||||
state.line = profile::recognize(chainages, elevations, grades, {});
|
||||
state.line.norms = norms;
|
||||
state.line.speed = route_speed(state.route);
|
||||
state.line.speed = editor_track::route_speed(state.route);
|
||||
state.selected = -1;
|
||||
profile_check();
|
||||
state.status = format(STR_P("Grade line recognized from the track: %zu point, largest departure %.3f m", "Grade line recognized from the track: %zu points, largest departure %.3f m", state.line.points.size()), state.line.points.size(), state.departure);
|
||||
@@ -933,7 +925,7 @@ void editor_mode::profile_fit_ground()
|
||||
return;
|
||||
}
|
||||
auto settings{state.line};
|
||||
settings.speed = route_speed(state.route);
|
||||
settings.speed = editor_track::route_speed(state.route);
|
||||
// the grade line is the rail top: it's fitted so the formation under it, not the rails, follows the ground
|
||||
auto ground{state.terrain};
|
||||
for (std::size_t i = 0; i < ground.size() && i < state.beds.size(); ++i)
|
||||
|
||||
Reference in New Issue
Block a user