mricon / ingress-fieldplan

Generate an easy workplan for Ingress fielding excursions
GNU General Public License v3.0
31 stars 8 forks source link

Feature request: Starting point #4

Closed danwie closed 5 years ago

danwie commented 5 years ago

Sometimes the starting portal in the generated plan is a portal furthest away from my current position. In these cases it is hard to find a alternative plan, because Fieldplan automatically uses the best one. I would like to suggest a starting point (and a end point).

This is how it could work:

For each generated plan, calculate the distance between the first portal in the plan and the start point and add this distance to the total distance. Keep plan if total distance is shorter than previous best found distance.

Also, an optional end point could work in a similar way: For each generated plan, calculate the distance between the last portal in the plan and the end point and add this distance to the total distance. Keep plan if total distance is shorter than previous best found distance.

mricon commented 5 years ago

I added the --beginfirst feature in a180378. If you pass the -b switch, it will force the first portal in the spreadsheet to be your starting portal. If you use both -b and -r, you'll both start and end at the first portal listed.

danwie commented 5 years ago

Thanks. Do I have to use a specific portal as starting point? I usually have a lot of portals near me and anyone of those will do as a starting point. My original suggestion was to set a specific coordinate as starting point. I think that would be more natural.