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

Trip planning #25

Closed
paulcwatts opened this issue Aug 31, 2012 · 11 comments
Closed

Trip planning #25

paulcwatts opened this issue Aug 31, 2012 · 11 comments
Milestone

Comments

@paulcwatts
Copy link
Member

There's no longer an OBA API for it, but people continue to ask for it. Frankly I doubt I will ever have time to do this, but I want to keep something open because it's such a popular feature request.

To be clear, this would involve either bringing back Brian's API, integrating OpenTripPlanner, or running my own server. If it were a different server it would have to be kept updated with GTFS updates just like the main OBA server is.

Moved from: http://code.google.com/p/seattle-bus-bot/issues/detail?id=83

@barbeau
Copy link
Member

barbeau commented Jun 3, 2013

We have an OTP server in Tampa as well as OBA, so we'd be happy to test any work on this.

@paulcwatts
Copy link
Member Author

I believe SoundTransit is going to be running their own OTP as part of their regional data services. Would this have to be included in the region data?

@barbeau
Copy link
Member

barbeau commented Jun 3, 2013

That's a good question. I believe the answer is yes, although we have some choices for implementation.

We have a OTP Server Directory too, very similar in concept to the OBA Server directory (OBA Directory was actually based on OTP Directory, but currently only API for OTP Directory is the direct CSV output of Google Doc). Currently, to my knowledge, our OTP Android app is the only application using the OTP Server Directory (an aside - we could definitely borrow code from OTP Android to speed along trip planning implementation in OBA Android, as its under Apache 2.0, with the exception of some of the OTP REST API response POJOs, that are under LGPL in a separate project).

So, in terms of adding regionalized OTP trip planning support to OBA apps via the OBA Regions API, I suppose there are two approaches:

  1. Provide a field in the OBA Server Directory and OBA Regions REST API that maps to the corresponding OTP Server Directory records - For consistency, we'd probably want to convert the OTP Server Directory output into a Region REST API with JSON and XML responses, as we've done with the OBA Server Directory. We could also provide a field that points to corresponding OBA servers from the OTP Directory. This would allow OBA apps to discover OTP servers, and OTP apps to discover OBA servers. It comes at the expense of an extra REST API call to hit the OTP directory as well as the OBA Regions API.
  2. Put all required OTP server information directly into the OBA Server Directory and OBA Regions REST API - Much less coordination between projects, although there is some duplication of effort with existing OTP Directory (although there are currently few consumers of this directory). Single REST API request/response for all region-related info.

@barbeau
Copy link
Member

barbeau commented Sep 25, 2015

@sheldonabrown This is the official ticket for trip planning on OBA Android. Just wanted to tag you so you received any updates here.

barbeau added a commit that referenced this issue Sep 26, 2015
* Adds a navigation drawer element to plan a trip
* When tapping on that element, opens a new activity that would start the trip planning UI flow
* See #25 for screenshots
@barbeau
Copy link
Member

barbeau commented Sep 26, 2015

I've started some work on fleshing out how this may fit into the current OBA UI navigation flow. Here's the branch:
https://github.com/OneBusAway/onebusaway-android/tree/25-tripPlan

Basically, this adds another navigation drawer option that opens to a new activity where the trip planning UI would start:

image

barbeau added a commit that referenced this issue Sep 26, 2015
barbeau added a commit that referenced this issue Sep 26, 2015
* Adds a navigation drawer element to plan a trip
* When tapping on that element, opens a new activity that would start the trip planning UI flow
* See #25 (comment) for screenshots
@barbeau
Copy link
Member

barbeau commented Sep 28, 2015

Some mockups for the possible look of the trip planning activity flow follow.

First trip planning screen is on the left - user taps on the "Plan My Trip" button, and sees the initial results screen shown on the right:

image

By tapping on the map icon in the upper right-hand corner, the user can see the same trip results on the map:

image

Note that this could be reversed as well so that the map-based results show up first.

Here's a sample "Advanced search" options screen, that the user would see when tapping on the menu of the initial origin/destination screen menu:

image

@barbeau
Copy link
Member

barbeau commented Sep 29, 2015

HART asked about a feature that would alert users when a bus is delayed and provide alternate trip plans, AFTER a user has already planned their trip.

We have something similar in OTP Android - here's how it works:

  • User plans a trip (based on real-time info that's provided to the OTP server)
  • Within 1 hr of the estimated departure time, OTP Android starts re-querying the server for updated estimates that effect that trip every minute
  • If the estimated arrival time changes from the original trip plan, the user is notified, and can tap on the notification to re-plan their trip

The discussion of the implementation of this feature starts around this comment in OTP Android:
CUTR-at-USF/OpenTripPlanner-for-Android#21 (comment)

...and this should be the PR that added the feature:
CUTR-at-USF/OpenTripPlanner-for-Android#306

Here are some screenshots of the notification, and how real-time info looks in context of the trip plan in OTP Android:

image

@barbeau
Copy link
Member

barbeau commented Mar 11, 2016

York's current trip planning implementation is slightly different that the original mockups they provided above in terms of content/style - the best way to see what the current app looks like is to sign up for their beta updates here - https://play.google.com/apps/testing/can.yrt.onebusaway.

barbeau added a commit that referenced this issue Mar 11, 2016
* Adds a navigation drawer element to plan a trip
* When tapping on that element, opens a new activity that would start the trip planning UI flow
* See #25 (comment) for screenshots
@barbeau
Copy link
Member

barbeau commented Mar 11, 2016

@sheldonabrown Ok, I've rebased the below branch on master as of today (currently v2.0.9):
https://github.com/OneBusAway/onebusaway-android/tree/25-tripPlan

This adds the new "Plan a trip" option to the navigation drawer as shown in #25 (comment), and when tapping on this it launches a new activity. The new activity is currently just a hello world shell, and you can drop in the York or OTP Android activity implementations there. Let me know if you have any questions!

sdjacobs pushed a commit to camsys/onebusaway-android that referenced this issue Jun 14, 2016
* Adds a navigation drawer element to plan a trip
* When tapping on that element, opens a new activity that would start the trip planning UI flow
* See OneBusAway#25 (comment) for screenshots
sdjacobs added a commit to camsys/onebusaway-android that referenced this issue Jun 14, 2016
- Code was integrated from York OBA app and OpenTripPlanner-for-Android.
- New TripPlanActivity with TripPlanFragment and TripResultsFragment.
- If a region has an OpenTripPlanner instance specified in otpBaseUrl field,
that instance will be queried from the trip planner.
- Realtime feature: after a trip is planned and an itinerary is selected, OTP
will be requeried every minute. If the rank of the selected itinerary changes
in a returned list of itineraries, or the selected itinerary is no longer
present, the user will be notified and can replan the trip.
sdjacobs added a commit to camsys/onebusaway-android that referenced this issue Jun 14, 2016
- Code was integrated from York OBA app and OpenTripPlanner-for-Android.
- New TripPlanActivity with TripPlanFragment and TripResultsFragment.
- If a region has an OpenTripPlanner instance specified in otpBaseUrl field,
that instance will be queried from the trip planner.
- Realtime feature: after a trip is planned and an itinerary is selected, OTP
will be requeried every minute. If the rank of the selected itinerary changes
in a returned list of itineraries, or the selected itinerary is no longer
present, the user will be notified and can replan the trip.
sdjacobs added a commit to camsys/onebusaway-android that referenced this issue Jul 19, 2016
- Code was integrated from York OBA app and OpenTripPlanner-for-Android.
- New TripPlanActivity with TripPlanFragment and TripResultsFragment.
- If a region has an OpenTripPlanner instance specified in otpBaseUrl field,
that instance will be queried from the trip planner.
- Realtime feature: after a trip is planned and an itinerary is selected, OTP
will be requeried every minute. If the rank of the selected itinerary changes
in a returned list of itineraries, or the selected itinerary is no longer
present, the user will be notified and can replan the trip.
sdjacobs added a commit to camsys/onebusaway-android that referenced this issue Jul 19, 2016
- Code was integrated from York OBA app and OpenTripPlanner-for-Android.
- New TripPlanActivity with TripPlanFragment and TripResultsFragment.
- If a region has an OpenTripPlanner instance specified in otpBaseUrl field,
that instance will be queried from the trip planner.
- Realtime feature: after a trip is planned and an itinerary is selected, OTP
will be requeried every minute. If the rank of the selected itinerary changes
in a returned list of itineraries, or the selected itinerary is no longer
present, the user will be notified and can replan the trip.
@barbeau
Copy link
Member

barbeau commented Jul 19, 2016

WIP PR at #541.

@barbeau
Copy link
Member

barbeau commented Jul 19, 2016

Squashed/rebased PR at #602.

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

No branches or pull requests

2 participants