From ef76bb3064410504aeb94b597ea484afecda3317 Mon Sep 17 00:00:00 2001 From: James Turner Date: Fri, 10 Apr 2020 10:38:50 +0100 Subject: [PATCH] MP startup: exclude parking positions as hold-shorts Only consider actual taxi nodes, not parking positions, as potential hold-short locations, when doing an MP runway-start relocation. This avoids some odd behaviours for groundnets which only define parking positions and nothing else. --- src/Airports/groundnetwork.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Airports/groundnetwork.cxx b/src/Airports/groundnetwork.cxx index 30ee31aef..564c17f77 100644 --- a/src/Airports/groundnetwork.cxx +++ b/src/Airports/groundnetwork.cxx @@ -234,6 +234,13 @@ FGTaxiNodeRef FGGroundNetwork::findNearestNodeOffRunway(const SGGeod& aGeod, FGR [runwayLine, cartPos, marginMSqr] (const FGTaxiNodeRef& a) { if (a->getIsOnRunway()) return false; + + // exclude parking positions from consideration. This helps to + // exclude airports whose ground nets only list parking positions, + // since these typically produce bad results. See discussion in + // https://sourceforge.net/p/flightgear/codetickets/2110/ + if (a->type() == FGPositioned::PARKING) return false; + return (distSqr(runwayLine, a->cart()) >= marginMSqr); });