add the last waypoint to the constraints

This commit is contained in:
Sven Czarnian
2021-10-13 18:12:04 +02:00
parent 2a83754fa4
commit d388fb5591

View File

@@ -162,6 +162,15 @@ class Airport:
index += 1 index += 1
# check if we have to add the last waypoint
if 0 != len(waypoints) and waypointName != waypoints[-1].Name:
waypoints.append(Waypoint(name = waypointName, base = isBaseTurn, final = isFinalTurn))
if -1 != constraints[0]:
waypoints[-1].Altitude = constraints[0]
if -1 != constraints[1]:
waypoints[-1].Speed = constraints[1]
# register the arrival route
self.ArrivalRouteConstraints[star] = waypoints self.ArrivalRouteConstraints[star] = waypoints
def __init__(self, filepath : str, icao : str): def __init__(self, filepath : str, icao : str):