Git Product home page Git Product logo

Comments (8)

otsaloma avatar otsaloma commented on June 2, 2024

I understand that when rerouting, we'll want to auto-start, but why would these buttons not make sense when rerouting? For example, if you stop for a cup of coffee on a long trip and want to examine the map, you'll want to press pause so that you can examine the map with auto-center, auto-rotate and without losing the route, which you'll resume after the coffee break. This should be valid when rerouting too?

Maybe it's the button names that need to be changed. Now that I think of it, begin and pause could be combined like the play/pause button on media players. It could initially say "Start", after that "Pause" and if paused, "Resume". What do you think?

from poor-maps.

otsaloma avatar otsaloma commented on June 2, 2024

Sorry, I read the condition hastily, but still, why would there be a case where the buttons should be disabled? Say, you have inaccurate positioning, and because of that route from an address? Or, you do the routing at home, but set it to begin from the parking lot a kilometer from your home?

from poor-maps.

rinigus avatar rinigus commented on June 2, 2024

Let me try to explain the thought behind it.

Let's start with the simple part: Start/Pause/Resume would be great. Indeed, you can make a stop, pause navigation, look into the route and check all possible features that you wish, and then resume navigation.

In this new way, why do I think that Start should be used only if you start from "Current position"? Maybe its the simplest by examples:

When "Current position" is allowed only

  • you start Poor Maps, select address where you want to go
  • your location is way off, somewhere 100km away, the calculated route does not make sense.
  • instead of waiting for the GPS fix, you accept the route and press Start
  • while you drive/cycle/walk out from where you are, GPS position is enhanced 2-3 times and route recalculated.
  • GPS fix is achieved, route recalculated and you can move along it.

This all works, assuming that you trust that the calculated route is fine.

When I can start navigation from address

  • you start Poor Maps, select address where you want to go
  • your location is way off, somewhere 100km away, so you find route from the known address. The calculated route makes sense.
  • instead of waiting for the GPS fix, you accept the route and press Start
  • while you drive/cycle/walk out from where you are, GPS position is enhanced 2-3 times. Now the question is, when would you recalculate the route? If its recalculated while GPS is searching for location, then there is no big difference major scenarios.
  • GPS fix is achieved and you are moving along original route. Again, should the route be recalculated?

As you could see, it boils down to making decision on when to recalculate the route. The both cases are probably fine assuming that if we start route which was found from address to address and then recalculate it as soon as we are too far from it (as given by 200 meters + positioning_precision). Originally, I didn't have positioning_precision component and then the difference between scenarios was significant. With it, the both cases are probably OK and you can pick and choose.

I can see positives in the both cases, so maybe you could pick the solution you prefer and then we''ll do it that way.

from poor-maps.

otsaloma avatar otsaloma commented on June 2, 2024

I somewhat understand the problem now, but still not the solution. Two things come to mind

  1. We need an option poor.conf.reroute anyway. That could default to false if routing from an address.

  2. Rerouting should only happen when positioning accuracy is below 40 meters or so, otherwise it doesn't really make sense.

What do you think?

from poor-maps.

rinigus avatar rinigus commented on June 2, 2024

While replying last time, I realized that my position is not as polarized as it is represented by the title of the issue. You presented a good case, so, with the rerouting option it would be fine to reroute with the root based on addresses. I was considering the routing from current position and from address as two different modes, but it makes sense not to distinguish them and assume that user knows better than GPS sometimes.

As for questions:

  1. poor.conf.reroute is needed, indeed. However, we may cause large confusion if it will start to get enabled and disabled by "magic". Maybe we should assume that if the user pressed "Begin" (or Start) then we are, as soon as we get the GPS fix, rerouting if the user had selected poor.conf.reroute=true before.

  2. Taking into account that rerouting via online routers costs API calls, it would probably make sense to have some minimal accuracy. However, we actually have accuracy setting offsetting these 200 meters and maybe its sufficient. In my latest tests, rerouting started to work only when it got quite accurate position anyway. Have you tried yourself? Did it started to reroute too early? If it did then we have to add this cut-off, but otherwise, its not really needed. But note that I don't have strong opinion on this either. If you think that 40m is adequate, let's add that condition.

from poor-maps.

otsaloma avatar otsaloma commented on June 2, 2024

I was considering the routing from current position and from address as two different modes, but it makes sense not to distinguish them and assume that user knows better than GPS sometimes.

Indeed, I don't see them as different modes. One common use case I didn't mention was calculating the route while still at home, inside, with poor GPS accuracy, and thus using one's home address. Another thing I sometimes use myself is starting the route a couple blocks away from home to "force" the route to the alternative which I know is best (e.g. due to road works not accounted for by routers).

I haven't done any testing, so I have no opinion on the parameters yet, but anyway, I'd like you to update the PR and remove all the app.navigationCanStart stuff. After that I can start tweaking the details, do some testing and we can return the parameters after that.

from poor-maps.

rinigus avatar rinigus commented on June 2, 2024

Its done in e728c7c. The only condition where app.navigationReroutable = false is when the route was calculated to current position. I guess, we can close this issue/discussion and move on, right?

from poor-maps.

otsaloma avatar otsaloma commented on June 2, 2024

Yep.

from poor-maps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.