alexander-albers / tripkit

Swift library for querying data from public transport providers.
MIT License
81 stars 8 forks source link

HCI: filter remarks and HIM-messages #50

Closed alexander-albers closed 2 years ago

alexander-albers commented 2 years ago

Currently, every unhandled remark or message is appended to the message text of a leg. The intention behind this was to not withhold any important information from the user. However at the moment way too many unnecessary information is being parsed, like the operator of the mot or mask mandates. On the other side, delay reasons like "Reparatur am Zug" might not be parsed at all.

The approach of for example the VBB app is to only parse around 10-20 remarks and show messages like the mask mandate only once per trip. The problem with this approach is that there are way too many remark types that could be parsed, so you have to make a selection without withholding key information (db, for instance, displays some text of the remarks-array below the trip leg).

Related issues are https://github.com/public-transport/hafas-client/issues/5 and https://github.com/marudor/BahnhofsAbfahrten/issues/139.

Todos for now:

alexander-albers commented 2 years ago

figure out why some messages are currently not being parsed

some messages may be inside the dep, arr or stopL location object of a seqL