Skip to content

Commit

Permalink
Merge pull request #56 from GIScience/fix/use_speed_calculator
Browse files Browse the repository at this point in the history
fix: obtain speed from `speedCalculator` in `fastestWeighting`
  • Loading branch information
takb authored Feb 22, 2023
2 parents 0801f7b + c40fd38 commit 173550c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ public double calcEdgeWeight(EdgeIteratorState edge, boolean reverse) {

@Override
public double calcEdgeWeight(EdgeIteratorState edgeState, boolean reverse, long edgeEnterTime) {
double speed = reverse ? edgeState.getReverse(avSpeedEnc) : edgeState.get(avSpeedEnc);
// ORS-GH MOD START: use speed calculator rather than average speed encoder to obtain edge speed
double speed = speedCalculator.getSpeed(edgeState, reverse, edgeEnterTime);
// ORS-GH MOD END
if (speed == 0)
return Double.POSITIVE_INFINITY;

Expand Down

0 comments on commit 173550c

Please sign in to comment.