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

Angles and speeds at turning always zero #7

Open
tomvanenckevort opened this issue Mar 16, 2020 · 2 comments
Open

Angles and speeds at turning always zero #7

tomvanenckevort opened this issue Mar 16, 2020 · 2 comments

Comments

@tomvanenckevort
Copy link

Originally posted by @tomvanenckevort in #6 (comment)

So I have been playing around with this a bit more and decided to have a look at the OSRM tile service to plot the various ways, speeds and angles.

But when I do that all the speeds and angles displayed at turnings seem to be set to zero:
image

I'm not really sure if that is a problem with the OSM data or the way OSRM has processed the data though?

For reference, I'm using the latest basic.lua profile from this repo and I run the following commands for OSRM:

  • docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-extract -p /opt/car.lua /data/cheshire-latest.osm.pbf
  • docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-partition /data/cheshire-latest.osrm
  • docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-customize /data/cheshire-latest.osrm
@C4ptainCrunch
Copy link
Contributor

Indeed, the turn processing function is very crude for now (see code). We only refuse truns that are too sharp and only add a time penalty on u-turns.

image
Debug map

How would you suggest to improve this ? 🙂

@tomvanenckevort
Copy link
Author

Yes, I noticed the angle checks in the profile. While I think that should work fine, when I noticed the angles displayed on the debug map as zero degrees it got me thinking that it would match all of those turns all the time.

So for example:
image

The green route here would be fine, but I would want to avoid the red route where it takes a very sharp turn.
I'm guessing it thinks that turn is zero degrees as well (based on the zero values displayed on the debug map here), so therefore the profile would accept this currently as a valid turn in the route, even though the actual turn is more than 30 degrees.

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

No branches or pull requests

2 participants