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

different value for late/early on arrivals&departures stop view when compared to trip details view #233

Open
wkulesza opened this issue Nov 14, 2019 · 6 comments

Comments

@wkulesza
Copy link

This has been discussed on the slack channel here:
https://onebusaway.slack.com/archives/C0FM22XEG/p1570010463011300

Transport Authority in Poznan (we're only using their GTFS-RT and adding for test purposes, without actually supporting this - more of a marketing approach to show OBA being successful in using GTFS-RT produced in Poland) has incorrect usage of delay value in their GTFS-RT (by negative value they understand bus is early) and we're using Sean Barbeau's suggestion here:
https://onebusaway.slack.com/archives/C0FM22XEG/p1570026349017000

However, we're still struggling with receiving opposite results for two different views:

Check 171 to OS. DEBINA
here 2 min early (which changed to 1 min early in a sec later) https://onebusaway.slack.com/files/U0YU8UY5D/FQ6SUL82X/image_from_ios.png
and here 1 min late https://onebusaway.slack.com/files/U0YU8UY5D/FQ5HHJ77U/image_from_ios.png

Second example:
here, 171 to OS. WICHROWE WZGORZA arrives in 2 minutes
https://go-europa.slack.com/files/U16LHG3QR/FQ5PXLNHY/image_from_ios.png

and here in that trip view it says arrives now (which was true)
https://go-europa.slack.com/files/U16LHG3QR/FQJHPQBG8/image_from_ios.png

Hard to say, but i can see this difference on both Ios and Android - even without flipping that sign +- on delay, values seem to be different for both views (stop view and trip details)

(171 to

@barbeau
Copy link
Member

barbeau commented Nov 14, 2019

@wkulesza Later in the Slack thread I suggested this:

Maybe try flipping the sign on best.scheduleDeviation when it is assigned here? https://github.com/OneBusAway/onebusaway-application-modules/blob/master/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/realtime/gtfs_realtime/GtfsRealtimeTripLibrary.java#L621

I believe this class is the only place where GTFS-rt data gets applied to the internal OBA data model, so if that doesn't work you might just have to go through and flip the sign on other places where the GTFS-rt TripUpdate delay value is retrieved.

Did you give this a try?

@wkulesza
Copy link
Author

@barbeau sorry for late reply.
This helped but surprisingly only in android, not in iOS. Debugging on. So arrivals and departures are ok but once you use trip details - incorrect sign in used.

@barbeau
Copy link
Member

barbeau commented Nov 19, 2019

@wkulesza Could you add the screenshots from iOS inline here? If I click on the links in the issue above I get stuck behind a Slack login.

Sound like iOS might be using a different field from the response than Android.

@wkulesza
Copy link
Author

@barbeau here an example:
http://prntscr.com/pz6vet

I asked my dev to provide url's that show up on simulator in xcode. He should add links here shortly.

@a1ex4nd3r
Copy link

@barbeau
Copy link
Member

barbeau commented Nov 19, 2019

When showing the vehicle on the map and the early/late info in that map marker, OBA Android uses the trips-for-route API. Maybe that's the difference here?

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

No branches or pull requests

3 participants