Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Libraries
KPublicTransport
Commits
dd8788f9
Commit
dd8788f9
authored
Sep 11, 2021
by
Volker Krause
Browse files
Only perform distance/speed sanity checks if we have coordinates
With TRIAS we are not getting coordinates here.
parent
3e17ef7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/journeyreply.cpp
View file @
dd8788f9
...
...
@@ -85,7 +85,7 @@ static bool isPointlessSection(const JourneySection §ion)
static
bool
isImplausibleSection
(
const
JourneySection
&
section
)
{
if
(
section
.
mode
()
==
JourneySection
::
Transfer
)
{
if
(
section
.
mode
()
==
JourneySection
::
Transfer
&&
section
.
from
().
hasCoordinate
()
&&
section
.
to
().
hasCoordinate
()
)
{
const
auto
distance
=
Location
::
distance
(
section
.
from
(),
section
.
to
());
if
(
section
.
duration
()
>
0
&&
(
distance
/
section
.
duration
())
>
30
)
{
qCDebug
(
Log
)
<<
"discarding journey based on insane transfer speed:"
<<
(
distance
/
section
.
duration
())
<<
"m/s"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment