-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Path not populated until routing ends #11
Comments
Hi Ludohenin, thanks for your appreciation. The second thing could be a cool feature; a good start should be to add a timeDelta parameter to Router(s), and then let the library user to modify it at each step. |
Stop calling the For the new feat, I think I got how to do it, I'll drop a PR for that soon. |
Ok, now I understand. It would be great if you fix also this in your PR
Great, thank you! |
Hi @dakk With regard to my issue to getting the path generated, I found that in the code below, I'm lost, I don't know what I'm doing wrong. libweatherrouting/weatherrouting/routers/linearbestisorouter.py Lines 66 to 83 in a4fb0fa
|
@dakk I found a ugly trick for now, adding an arg to step to set for p in isoc[-1]:
distance_to_end_point = p.pointDistance(end)
if distance_to_end_point < self.getParamValue("minIncrease"):
# (twd,tws) = self.grib.getWindAt (time + datetime.timedelta(hours=timedelta),
# p.pos[0], p.pos[1])
maxReachDistance = utils.maxReachDistance(p.pos, p.speed)
if distance_to_end_point < abs(maxReachDistance * 1.1):
if (
not self.pointValidity or self.pointValidity(end[0], end[1])
) and (
not self.lineValidity
or self.lineValidity(end[0], end[1], p.pos[0], p.pos[1])
):
if distance_to_end_point < nearest_dist:
nearest_dist = distance_to_end_point
nearest_solution = p
# Added part to get path when ending steps before reaching the waypoint
if isLast:
if not nearest_solution:
nearest_solution = p
else:
nearest_solution = p if distance_to_end_point < nearest_solution.pointDistance(end) else nearest_solution
if nearest_solution:
generate_path(nearest_solution) |
Your solution works but is not very elegant; I made an alternative in #17 , please give a try and see if matches your requirement |
Hi,
Thanks for your amazing work.
I'm looking at a way to define the number of steps to iterate to end routing from here rather than reaching the destination.
Is there an easy way to do that ?
The other thing (but it's maybe more a feat request) nice to have would be the possibility to have shorter steps the 1st 24h (say 20min) and 1 hour or more after.
The text was updated successfully, but these errors were encountered: