diff --git a/src/types/Inbound.cpp b/src/types/Inbound.cpp index ea5e85b..71562c4 100644 --- a/src/types/Inbound.cpp +++ b/src/types/Inbound.cpp @@ -233,7 +233,7 @@ int Inbound::matchToPredictedPath(const EuroScopePlugIn::CFlightPlanPositionPred trackmiles = 0_m; if (1 >= predictions.GetPointsNumber()) - return 0; + return 1; std::vector distances; distances.reserve(static_cast(predictions.GetPointsNumber()) - 1); @@ -250,7 +250,7 @@ int Inbound::matchToPredictedPath(const EuroScopePlugIn::CFlightPlanPositionPred /* calculate the theoretical maximum distance (assuming one minute steps) and validate the distance */ const auto& maxDistance = groundspeed * 1_min; if (gsl::at(distances, idx) > maxDistance) - return 0; + return predictions.GetPointsNumber(); if (idx + 1 < static_cast(predictions.GetPointsNumber()) && 0 != idx) { const auto bearingCurrent = position.bearingTo(GeoCoordinate(__convert(predictions.GetPosition(idx))));