Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend ABI to expose journeys, footpaths, cancellations #139

Merged
merged 8 commits into from
Jan 1, 2025

Conversation

traines-source
Copy link
Contributor

This finally addresses most of the open todos from #66, among other things:

  • handle RT track changes, in_allowed/out_allowed
  • expose footpaths
  • expose querying/journeys

There is one change I made that has an impact outside of the ABI: For absolute-time-based GTFSRTs (ev.has_time()), the time-travel-corrected time will be propagated in L119 just like for delay-based GTFSRTs in L94. I think this was a bug.

@felixguendling
Copy link
Member

Regarding formatting: We switched to Clang-18 (clang-format-18).

@felixguendling
Copy link
Member

@mority can you please check the GTFS RT part with the proposed propagation bugfix? Thank you :)

@traines-source
Copy link
Contributor Author

Regarding formatting: I just forgot to format this file, and the .clang-format config, which my editor should use, seems to be fine even if it has not been updated in the past two years?

More details regarding propagation: As far as I understood this was meant to avoid vehicles travelling back in time due to missing or wrong realtime updates, e.g. having a delay of one hour at one stop and arriving on time at the next stop which is only a minute away. I think I even encountered this in the wild back in the day (with the RT feed from gtfs.de which uses absolute timestamps), but I'm not sure anymore, would have to check.

@traines-source
Copy link
Contributor Author

Sorry for the wait, good points. I have refactored accordingly, but instead of an enum I have used std::optional on the C++ side and an additional bool on the C side, because the delay actually also needs to be ignored/undefined for events where stop metadata (track or in/out_allowed) is changed.

@felixguendling felixguendling merged commit 255e31e into motis-project:master Jan 1, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants