Fix rounding error in street routing - #6484
Conversation
…reating the reversed path for arriveBy queries
…ange to work with changed arriveBy time rounding logic
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6484 +/- ##
=============================================
+ Coverage 70.10% 70.13% +0.02%
+ Complexity 18273 18269 -4
=============================================
Files 2077 2077
Lines 77658 77620 -38
Branches 7827 7820 -7
=============================================
- Hits 54443 54439 -4
+ Misses 20438 20402 -36
- Partials 2777 2779 +2 ☔ View full report in Codecov by Sentry. |
|
Ok, now I no longer change anything of note. I'm not sure where the problem originates from. |
|
The truncation was wrong, so the check is wrong, and there never was anything actually incorrect. |
…eRequest datetime to be an exact number of seconds. Backward and forward searches will now not match unless the request datetime is an exact number of seconds.
|
There's still a place where I have to round the input time to a whole second in RouteRequest, I'll do it today, and then undraft the pr. |
| ) { | ||
| OTPRequestTimeoutException.checkForTimeout(); | ||
| Instant reqTime = request.dateTime().truncatedTo(ChronoUnit.SECONDS); | ||
| Instant reqTime = request.dateTime().truncatedTo(ChronoUnit.MILLIS); |
There was a problem hiding this comment.
is it necessary to truncate again here? It seems that the unit tests pass even without truncating.
There was a problem hiding this comment.
This has become unnecessary due to later changes. I'm taking it out.
fix inaccuracy in state reversal which generates rounding errors in creating the reversed path for arriveBy queries
Summary
Explain in one or two sentences what this PR achieves.
Issue
Fixes #6481
Unit tests
Added a bit of testing for the reversal code to work accurately no matter what the millisecond part of the time in the request.
Changelog
Not needed, bug fix for a new fix.
Bumping the serialization version id
No.