From e1eb50f6d3cf68e060385f6d28bdd12d75e4daf4 Mon Sep 17 00:00:00 2001 From: Sven Czarnian Date: Fri, 17 Dec 2021 13:32:07 +0100 Subject: [PATCH] avoid crashes due to invalid WTC entries --- aman/sys/aco/RunwayManager.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aman/sys/aco/RunwayManager.py b/aman/sys/aco/RunwayManager.py index f7f21ab..a7a8afe 100644 --- a/aman/sys/aco/RunwayManager.py +++ b/aman/sys/aco/RunwayManager.py @@ -29,7 +29,12 @@ class RunwayManager: if None == self.RunwayInbounds[runway].Inbound.WTC or None == node.Inbound.WTC: spacingWTC = 3 else: - spacingWTC = self.Spacings[self.RunwayInbounds[runway].Inbound.WTC][node.Inbound.WTC] + if self.RunwayInbounds[runway].Inbound.WTC not in self.Spacings.WtcSpacing: + spacingWTC = 3 + elif node.Inbound.WTC not in self.Spacings.WtcSpacing[self.RunwayInbounds[runway].Inbound.WTC]: + spacingWTC = self.Spacings.WtcSpacing[self.RunwayInbounds[runway].Inbound.WTC]['L'] + else: + spacingWTC = self.Spacings.WtcSpacing[self.RunwayInbounds[runway].Inbound.WTC][node.Inbound.WTC] # get the runway time spacing spacingRunway = self.Configuration.RunwayConstraints.findRunway(runway).Spacing