railtoolkit / schema

This repo collects the descriptions of the structure and the validation constraints of tools in the railtoolkit in JSON schemas. It is, therefore, an alternative to RailML.
ISC License
1 stars 0 forks source link

characteristic_sections of Running Path Schema should contain named attributes #4

Closed apriljunge closed 3 months ago

apriljunge commented 1 year ago

Currently, characteristic_sections is defined as an array whose property is defined by the order. I think it would be better and more future-proof to use named properties.

Like:

characteristic_sections:
  - position: 0
    speed: 10
    resistance: 0
  - position: 0
    speed: 10
    resistance: 0

The same does apply to points_of_interest

apriljunge commented 1 year ago

Maybe then characteristic_sections and points_of_interest could be unified?

kaat0 commented 1 year ago

Agree on naming the properties!

characteristic_sections and points_of_interest are different in nature and properties. One of the reason of the existence of this schema is that it can be written manually. Since both come from different sources, it is easier not to merge them in the path-file but in the program using the path-file. Therefore, my current position is not to unify them.

kaat0 commented 1 year ago
points_of_interest:
  - position: 2000.00
    label: main_signal_1
    measure: front
  - position: 9050.00
    label: clearing_point_1
    measure: rear
apriljunge commented 1 year ago

characteristic_sections and points_of_interest are different in nature and properties. One of the reason of the existence of this schema is that it can be written manually. Since both come from different sources, it is easier not to merge them in the path-file but in the program using the path-file. Therefore, my current position is not to unify them.

Totally agree. My original thought was to define velocity changes on signals (poi) directly.