From 54124871789535f4c6468abb53c277dd8fd60462 Mon Sep 17 00:00:00 2001 From: Khopa Date: Sat, 7 Aug 2021 00:38:12 +0200 Subject: [PATCH] Handle another error case in generate_at_cp_helipad + align helos heading with their slot --- gen/aircraft.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gen/aircraft.py b/gen/aircraft.py index c46b3212..6b112fd7 100644 --- a/gen/aircraft.py +++ b/gen/aircraft.py @@ -564,6 +564,7 @@ class AircraftConflictGenerator: # Note : A bit dirty, need better support in pydcs group.points[0].action = PointAction.FromGroundArea group.points[0].type = "TakeOffGround" + group.units[0].heading = helipad.heading if start_type != "Cold": group.points[0].action = PointAction.FromGroundAreaHot group.points[0].type = "TakeOffGroundHot" @@ -575,11 +576,14 @@ class AircraftConflictGenerator: if helipad is not None: helipad.occupied = True group.units[1 + i].position = Point(helipad.x, helipad.y) + group.units[1 + i].heading = helipad.heading else: raise RuntimeError( f"Control Point {cp.name} does not have enough helipads" ) return group + else: + raise RuntimeError(f"Control Point {cp.name} does not have enough helipads") def _add_radio_waypoint( self,