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

Feature: arrival time and/or time until departure dependent upon calendar #9

Open
charp07 opened this issue Dec 3, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@charp07
Copy link

charp07 commented Dec 3, 2019

2 ideas for improvement. If I knew how to code I would love to work on this but I am new to code and am currently learning intro to cs now!

1.) include a feature to add commute time and current time to show arrival time if leaving NOW.

2.) Include a feature that uses calendar event time minus current commute time equal to departure time for on-time arrival (also include a way to move the time by 60 mins one way or another, to allow for early meeting arrival)

thanks for your amazing work!

@charp07 charp07 added the enhancement New feature or request label Dec 3, 2019
@radokristof
Copy link

I also want this feature. This calendar options is a great addition, however it is really hard to specify a global maxCalendarTime . I did some initial enhancements to the module (like translations, I'm still testing it), but I will try to implement this, but it is going to be more complicated than I first thought...

@radokristof
Copy link

The first feature request is ready.

@qistoph
Copy link
Owner

qistoph commented Mar 28, 2020

The first idea of this issue was fixed with the great PR by @radokristof .

I think the API also allows one to specify a preferred arrival time. So I'll give your second idea some thought on how to implement this.

What's your thought on this... should the module
a) allow one to choose per calendar event to use preferred arrival time
b) have a global option to show trips based on preferred arrival time instead of using current departure time
c) have a global option to show trips based on preferred arrival time in addition to using current departure time

In case of c), mock-ups of a nice layout would be very welcome.

Also ideas of how/where to specify any additional time to arrive early, are more than welcome.

@radokristof
Copy link

radokristof commented Mar 28, 2020

I think option B would be the best.
Most of us I think will use the preferred arrival time instead of the current one (and I can't think of any real world situation where you specify a calendar event with a location and you don't want to arrive at that time but much earlier/later).
Also we could then re-use the current maxCalendarTime. This will be used to fetch preferred arrival time (to make sure not to check too many calendar destination). If the preferred arrival time is in range (maybe we could add some margin here +/- 5 min maybe) then show the module.
I think in this mode, it will return the startTime (when you should start driving). So we should check if the current time is greater (or almost greater) than the returned value.

However I have not looked into the node_helper.js yet, where all these calls are handled and I think this needs some changes there (mostly there...). Can you help with this one?

From Google:

arrival_time — Specifies the desired time of arrival for transit directions, in seconds since midnight, January 1, 1970 UTC. You can specify either departure_time or arrival_time, but not both. Note that arrival_time must be specified as an integer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants