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

Fix timetable generation for StopTimeUpdate containing only arrival or departure #6392

Open
wants to merge 3 commits into
base: dev-2.x
Choose a base branch
from

Conversation

miklcct
Copy link
Contributor

@miklcct miklcct commented Jan 17, 2025

Summary

The GTFS-RT specification does not require both arrival and departure to be provided for a TripUpdate, only either of them is enough. This fixes NEGATIVE_DWELL_TIME or NEGATIVE_HOP_TIME resulting from these updates as they were not processed correctly.

Issue

Closes #6391

Unit tests

Added

Documentation

None needed

Changelog

Bumping the serialization version id

None needed

@miklcct miklcct force-pushed the arrival-only-tripupdate branch from 0541650 to 7a96e1a Compare January 17, 2025 11:58
@miklcct miklcct changed the title Fix NEGATIVE_DWELL_TIME for arrival only StopTimeUpdate Fix NEGATIVE_HOP_TIME for arrival only StopTimeUpdate Jan 17, 2025
@miklcct miklcct force-pushed the arrival-only-tripupdate branch from 7a96e1a to f60c1db Compare January 17, 2025 13:11
@miklcct miklcct force-pushed the arrival-only-tripupdate branch from f60c1db to 863c0cd Compare January 17, 2025 13:27
@miklcct miklcct changed the title Fix NEGATIVE_HOP_TIME for arrival only StopTimeUpdate Fix timetable generation for StopTimeUpdate containing only arrival or departure Jan 17, 2025
@miklcct miklcct marked this pull request as ready for review January 17, 2025 15:47
@miklcct miklcct requested a review from a team as a code owner January 17, 2025 15:47
@miklcct
Copy link
Contributor Author

miklcct commented Jan 17, 2025

I need discussion of the behavior in filling the missing times.

.addStop(STOP_B1, "0:01:10", "0:01:11")
.addStop(STOP_C1, "0:01:20", "0:01:21")
.addStop(STOP_A1, "0:00:00", "0:00:00")
.addStop(STOP_B1, "0:05:00", "0:10:00") // 5-minute dwell
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.addStop(STOP_B1, "0:05:00", "0:10:00") // 5-minute dwell
// 5-minute dwell
.addStop(STOP_B1, "0:05:00", "0:10:00")

Trailing comments are noe allowed according to over coding guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants