Commit dd8788f9 authored by Volker Krause's avatar Volker Krause
Browse files

Only perform distance/speed sanity checks if we have coordinates

With TRIAS we are not getting coordinates here.
parent 3e17ef7f
......@@ -85,7 +85,7 @@ static bool isPointlessSection(const JourneySection &section)
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";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment