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

Inconsistent Delay Times #343

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Inconsistent Delay Times #343

wants to merge 5 commits into from

Conversation

nfq2
Copy link

@nfq2 nfq2 commented Oct 23, 2024

Overview

Fix bug where the final delay time is not accurate.

Changes Made

Added logic in RouteUtilsV3.js to iterate over each route in finalBusRoutes, calculates total delay from bus segments, and apply this delay to the 'walk' segment if it follows a delayed bus segment.

Test Coverage

Tested routes with no delays, delays, final destination at bus stop, final destination not at bus stop. Finding routes with multiple different bus and walking segments that had delays were a bit difficult, so I just created my own route object with directions to test the code.

Next Steps

Related PRs or Issues

https://github.com/cuappdev/ithaca-transit-ios/issues/392

Screenshots

Original bug (delay not reflected in final time):
image

Request body:
{
"end": "42.4403, -76.4962",
"uid": "B1CD4726-0CA8-41DC-A2F4-01D5D8F3A3E0",
"time": 1729604959,
"destinationName": "Thompson and Bleeker",
"start": "42.4852, -76.4909",
"arriveBy": false,
"originName": "Target"
}

One of the routes contains a bus delay:
image

Delay time reflected in final walking segment:
image

@nfq2 nfq2 changed the title Nicole delay final time Inconsistent Delay Times Oct 23, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this consider the delay for the first walking portion before you get onto the bus? I think you will also need to check if the first bus in the directions is delayed and if so, add that time to the first walking portion of the directions (when you walk to the bus stop).

Choose a reason for hiding this comment

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

^

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