Trip progress notification
I just read this article about a new Google Maps transit feature, where it shows a notification of your next action and when, and I find the idea pretty cool: https://arstechnica.com/gadgets/2017/12/google-maps-finally-gets-step-by-step-transit-navigation/.
Could it be possible to add this to Transportr at some point? And display a heads-up notification when near an important event, like your train or bus almost arriving or reaching your stop, so you won't miss it? That would be so great and keep me from having to constantly keep an eye on Transportr while in the bus to make sure I get off at the right stop.
I have something like this planned a long time ago, just need to find the time to actually implement it.
I'd like to see something like this as well. Initially even just a reminder/notification/alarm N minutes before you need to leave the current vehicle would be already quite useful (where N should be a user-adjustable setting).
I am going to see if I can implement this. I would really like this too.
Thanks for your willingness to work on this!
Just a heads-up: This is the single most complicated feature of Transportr. I am myself still thinking about how to implement this best. Ideally, the position detection algorithm can later also be used to give a preview about the arrival-time, find alternative connections if one will be missed and warn the user before they need to change trains/buses. So the algorithm needs to be very precise, also work with bad GPS reception and while in a subway. Showing wrong information here can make users very angry.
I was planning to just alert the user when they were 2 stops away from their destination and do some rounding to the nearest station using the GPS.
Ideally, the position detection algorithm can later also be used to give a preview about the arrival-time, find alternative connections if one will be missed and warn the user before they need to change trains/buses. So the algorithm needs to be very precise, also work with bad GPS reception and while in a subway. Showing wrong information here can make users very angry. This is very ambitious as the gps on my phone has been not very good. I would love to also implement what you are describing as it sounds very useful. One way to reduce noise in the gps data would be to use a kalman filter: https://en.wikipedia.org/wiki/Kalman_filter
There is a library here: http://kalman.sourceforge.net/index.php
I have learned about kalman filtering in class but it would be a challenge to implement this correctly.
I dont know what I should look into at this point so let me know.
A first step might be to highlight the current stop according to the time and the latest available delay data. I think, DB Navigator does something similar, but I guess this might work better for long-distance trains than for bus routes with small time difference between the stops.
I personally think that it wouldn't be worth it to build something based on time and real-time info. The latter isn't always available and as you say there's many kind of trips where this is likely to not work reliably.
Same idea in https://github.com/grote/Transportr/issues/437:
A "reminder" feature may also be set for specific bus/tram/train stops, i.e. so you do not miss your train? Maybe even better make it a real alarm like the clock application does, so when you sleep or so you get waked up at your specified destination/changeover.
As for what was discussed here: IMHO it would be fine just updating the current arrival times from the APIs and then using the time (not GPS!) to determinate the stop location. As such I agree with @ialokim and think GPS may be implemented later, but time-based should be the first thing. It's easier to implement, is more reliable (GPS information in tunnels or so may be outdated) and drawns less battery. Also in my cases real-time data is always available, and if not then you may disable that feature for now. As people said, DB Navigator does it and for this huge network alone, this feature may be useful.
So IMHO, the steps for this task are:
- stage 1: time-based notifications for networks with real-time data
- stage 2: GPS-based notification for all networks combined with time-based notifications for networks with real-time data
In any case, especially if it uses GPS; one should be able to disable this, because of the increased battery usage.