18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 15:17:08 +01:00
Commit Graph

4 Commits

Author SHA1 Message Date
maj00r 9016b3a951 Merge feat/editor-model-turnouts-ui into feat/editor-project-setup 2026-11-24 19:30:21 +01:00
maj00r a8e1e6ab71 fix(editor): TSI and EN take close jumps of the cant deficiency together, the norms queue keeps its own span after a delete
- TSI INF and EN 13803 limit an abrupt change of the cant deficiency but give no intermediate length, so two jumps a few metres
  apart were each checked alone: at km 478 of the golden line CH reported 191 mm over the TSI limit, TSI itself nothing. With
  no intermediate length in the profiles of the element, the longest any profile asks for is taken. The golden report changes
  that way: TSI gets the 191 mm hard limit at km 478, EN reports it instead of 106 and 85 mm one by one.
- forget() moves the span whose findings alone are kept (a diverging track) down by the spans removed before it, and drops a
  queued line whose own span was removed, instead of leaving the index on another span.
- The report test of R 400 / 80 mm runs at 90 km/h and requires the finding: at 80 km/h there was none and the check never ran.
2026-11-24 18:40:23 +01:00
maj00r 075a66d169 feat(editor): the assumptions of the project asked for at the start, what's drawn, kept with the map
editor-project-setup.md: a new user drew with no word of what: the norms, the speed, the gauge and the rail lay about the panels, set
on the way. Now one short step, "What do you draw?" (Co rysujesz?), one screen of defaults and one button:

- The fields: the norms (PLK ST-T1-A6, TSI alone, EN 13803, CH; PLK by default, no "none": a fictional scenery has a profile too), the
  speed of the line (chips 40..200, 100 km/h), the traffic, a main or a side track, the gauge (1435 / 1520 / 1000 / 750 / 600 mm),
  the rail (60E1 / 49E1 / S42), the look of the tracks under More (the rails and the trackbed as now where left empty).
  application/editorsetupui.* draws them for all three places below.
- Asked for as the last step of the wizard of a new scenery (4., or 2. for a fictional one; its button Start: create and open in the
  editor), which writes them into the new scenery; and in a scenery with none, as a card in the inspector of the tracks in place of the
  first steps, until its Start. Changed later in their window, Assumptions of the project, from the editor settings or the line of
  them under the first steps in Tracks; a change checks the lines laid before against them, the report in the window of the norms,
  nothing laid changed by it.
- Kept with the map (editor/editorProjectSetup.*, one record "setup norms plk speed 100 traffic mixed track main gauge 1435 rail 60E1"):
  in its project file where it has one (a record of its own; the profile of the scenery the model judges by set with it), else in the
  scenery as //$u lines, which the simulator skips and the scene layers keep as a mark of the editor. Read when the map is opened, the
  project file first. A scenery saved without them holds nothing new.
- The defaults of the tools from them: the speed of the laying and of the route design, the gauge and the rails and the trackbed of the
  tracks laid, the norms checked against, the rail of the switch tool and the usual switch of the rail for the speed on its diverging
  track (the closest speed, the ratio usual for it). A route with no speed of its own takes the speed of the assumptions.

Self-test: setup [<key> <value>]..., setupwindow [close]; expect setup none|<key> <value>, expect setupmark <present|absent>, expect layspeed <km/h>. The cases
ps_1_setup_saved (set, saved into the scenery, read back after a reopen) and ps_2_setup_project (into the project file with the
editing on the model, read from there after a reopen with it off).

Tests: U: the record written and read back, the defaults, what it can't read, the class of the line, kept in the project file.

lang/editor_pl.po: the Polish of the new texts.
2026-11-23 23:24:28 +01:00
maj00r 38f90387c4 feat(editor): the norms checked on the tracks laid, read only: a Norms tab of the track analysis and its report
The second half of E1: what the tracks of a scenery are against a profile of the norms, listed. Nothing of the tracks is changed.

- editor/editorNormsReport: a line of paths sampled a metre apart, two samples at each joint, into what the norms read a line
  from: the plan, the curvature signed by the turn, the cant on the base of 1500 mm (as the simulator takes the rolls) signed by
  the side it leans to as the line runs, the grade, the speed of each path (a switch's for its diverging track alone too), and
  what the path is a part of (a switch, its diverging track, a curved switch, a movable frog, a crossing). The line described,
  checked, and each finding set back on its path with a point of it; its message, "cant ramp 3.00 mm/m, PLK allows at most 2.50 mm/m
  (tab. 9.12)", "break of the grade with no vertical curve, PLK asks for a radius of at least 2500 m (tab. 10.2)", through STR_C;
  the text of the report: the class, the elements, the cant, the grade line and the findings of each line.
- The Norms tab of the track window, under More beside Speed and Joints, no key; its window is ###trackanalysis, as theirs. The
  line through the selected path (run_route, as the speed check walks it) or the whole scenery: the lines through the plain tracks,
  then each path of a switch none of them ran along, checked with the line it lies in and its own findings kept, a place two lines
  run through listed once. The profile (PLK by default) and the class of the line folded under a line saying it: the line speed for
  the tracks with none of their own (on by default: the speed of each track), the slow trains (tab. 8.1 by default), the traffic,
  main track or siding, the load, at a platform. The results in the table of the speed check and the joints, the worst first,
  coloured by the tier, the values above the recommended ones on a tick; a click on a row shows the place, the hard limits and the
  warnings are marked in the view. The icon is drawn into its own cell of editor_icons.png only (the generator has it): the sheet
  drawn again with this Pillow differs in other cells.
- Self-test: normsreport <file> [scope] [plk|tsi|en|ch] [km/h] writes the report to the file; expect findings <tier> <least> <most>;
  the case e1_norms_report checks the curves k0..k3 of the fixture at 60 km/h against PLK and the whole scenery against the TSI.
- Golden: data/norms/line.scn, a line of 14 tracks written by make_line.py there (curves with and without transitions, cant on and
  off a curve and along a straight, reverse curves 10 m apart, short straights, a grade with breaks), and its report against the
  four profiles in data/norms/line_report.txt; EU07_UNIT_TESTS_UPDATE_GOLDEN=1 writes it anew. A test lays a canted corner with the
  alignment of the editor and finds the samples leaning into it, both turns and run both ways, I = Deq - D.

alignment::limits stays as the laying tools use it. Where its values differ from PLK P0:
- unbalanced 0.6 m/s2 is I 92 mm on the 1500 mm base; P0 110 mm (P1 130) on the running lines, 80 on the sidings;
- ramp_factor 10, a ramp of 1:(10 V), 1 mm/m at 100 km/h and 2.5 mm/m at 40 km/h, has no counterpart: P0 1.6 mm/m at any speed;
- jerk 0.3 m/s3 is dI/dt 46 mm/s; P0 55 mm/s;
- vertical_factor 0.4 V^2 and vertical_min 2000 m; P0 max(0.77 V^2, 5000 m) (P1 max(0.35 V^2, 5000), P2 max(0.25 V^2, 2000));
- arc_min 20 m and arc_min_factor 0.4 V; P0 max(0.35 V, 30 m) up to 120 km/h, 0.40 V up to 200 km/h, also for the straights, where
  tangent_min_time is 0;
- the same: cant_max 150 mm (P0 = P1 = P2 on ballast), cant_rate 35 mm/s (P0 of tab. 9.13), the base of 1500 mm.
2026-11-23 10:28:27 +01:00