create deep copies to allow changes of constraints per arrival
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import copy
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from aman.types.ArrivalRoute import ArrivalRoute
|
from aman.types.ArrivalRoute import ArrivalRoute
|
||||||
@@ -137,10 +138,10 @@ class SctEseFormat:
|
|||||||
sys.stderr.write('Unable to find a close waypoint for ' + waypoint)
|
sys.stderr.write('Unable to find a close waypoint for ' + waypoint)
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|
||||||
waypoints.append(nearest)
|
waypoints.append(copy.deepcopy(nearest))
|
||||||
# extend the list of waypoints
|
# extend the list of waypoints
|
||||||
else:
|
else:
|
||||||
waypoints.append(coordinates[0])
|
waypoints.append(copy.deepcopy(coordinates[0]))
|
||||||
|
|
||||||
# create the arrival route
|
# create the arrival route
|
||||||
return ArrivalRoute(split[3], split[2], waypoints)
|
return ArrivalRoute(split[3], split[2], waypoints)
|
||||||
|
|||||||
Reference in New Issue
Block a user