-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Traffic updates do not support floats #5079
Comments
Do you think floating point precision is important for your use-case or would routing fix this? |
@TheMarex Yes, the precision is important. We're using OSRM in a sort of unconventional way and it makes a difference. I tried to multiply the value by say 1000, so we could discard the decimals, but that gives weird results and the routes picked change. (Any idea why this happens? Is there any speed limit set internally?) |
What you could try is to change https://github.com/Project-OSRM/osrm-backend/blob/master/include/updater/source.hpp#L53 to |
also a CSV line grammar at https://github.com/Project-OSRM/osrm-backend/blob/master/src/updater/csv_source.cpp#L40 must be changed to
|
@danielfdsilva one reason why simply multiplying by 1000 might not work is because of the other weights associated with the graph - primarily turn costs. Unless you've made extensive changes to the Also note that interanlly, OSRM precision is limited - we only store 0.1 second resolution on any road edge, and 0.1 resolution for turn costs. This is one of the reasons that @TheMarex wondered why decimal precision on speeds matters - OSRM may already not store sufficient precision for your use. |
@danpat I did heavily modify the lua file, stripping it of almost everything. Ours is a very specific use case, that's why we've these needs. |
An error is thrown when
edge_speed_in_km_h
is a float, however float values are allowed through the profile file withforward_speed
,backward_speed
.The text was updated successfully, but these errors were encountered: