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

Compute correct speed values in tile plugin #3790

Merged
merged 1 commit into from
Mar 9, 2017
Merged

Conversation

oxidase
Copy link
Contributor

@oxidase oxidase commented Mar 9, 2017

Issue

In #2399 tile plugin was not adjusted and returned weight-based speed values that look misleading if profile weight is not duration.
PR fixes speed to be distance / duration, adds weight feature and fixes turn durations.

/cc @TheMarex

Tasklist

  • review
  • adjust for comments

Requirements / Relations

Link any requirements here. Other pull requests this PR is based on?

Copy link
Member

@TheMarex TheMarex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two if checks still need to be adjusted otherwise good to go. 👍 Could you also write a changelog entry for this bug fix?

@@ -568,14 +596,15 @@ void encodeVectorTile(const datafacade::ContiguousInternalMemoryDataFacadeBase &

// Calculate the speed for this line
std::uint32_t speed_kmh =
static_cast<std::uint32_t>(round(length / reverse_weight * 10 * 3.6));
static_cast<std::uint32_t>(round(length / reverse_duration * 10 * 3.6));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If statement above needs to be adjusted as well, it check for zero division.

@@ -544,14 +571,15 @@ void encodeVectorTile(const datafacade::ContiguousInternalMemoryDataFacadeBase &

// Calculate the speed for this line
std::uint32_t speed_kmh =
static_cast<std::uint32_t>(round(length / forward_weight * 10 * 3.6));
static_cast<std::uint32_t>(round(length / forward_duration * 10 * 3.6));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If statement above needs to be adjusted as well, it check for zero division.

@TheMarex TheMarex added this to the 5.6.3 milestone Mar 9, 2017
@TheMarex TheMarex merged commit 0a13390 into master Mar 9, 2017
@oxidase oxidase deleted the fix/debug-tiles branch March 9, 2017 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants