-
Notifications
You must be signed in to change notification settings - Fork 0
/
sectors.py
48 lines (45 loc) · 2.06 KB
/
sectors.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
class Sector:
def __init__(self, name: str, lower_limit: int, upper_limit: int, note: str, sector_type: str,
owners: str, alt_owner: str, active: str, guests: str, dep_apt: str, arr_apt: str,
add_display: str, minimum_safe_altitude_warning: int, definition: str, in_use: str = 'yes'):
"""
Create a sector object
:param name: Sector name
:param lower_limit: Lower limit in feet
:param upper_limit: Upper limit in feet
:param note: Additional notes
:param sector_type: Type of sector. Should be 'GND', 'TWR', 'APP', 'FIN', 'CTR' or 'OTH'.
:param owners: Position names of owners of the sector in order of precedence.
:param alt_owner: Alternative owner configurations
:param active: Conditions for sector activation
:param guests: Guest controllers that do not raise renegade alerts
:param dep_apt: Departure airports the sector activates
:param arr_apt: Arrival airports the sector activates
:param add_display: Additional display lines definitions
:param minimum_safe_altitude_warning: Minimum Safe Altitude Warning in feet
:param definition: Sector definition, a sequence of DynPoints
:param in_use: 'yes' or 'no', defaults to 'yes'
"""
self.name = name
self.lower_limit = lower_limit
self.upper_limit = upper_limit
self.note = note
self.sector_type = sector_type
self.owners = owners
self.alt_owner = alt_owner
self.active = active
self.guests = guests
self.dep_apt = dep_apt
self.arr_apt = arr_apt
self.add_display = add_display
self.minimum_safe_altitude_warning = minimum_safe_altitude_warning
self.definition = definition
self.in_use = True if in_use == 'yes' else False
class SectorParser:
Sectors: set[Sector] = set()
def __init__(self, file: str):
"""
Parse Sectors XLS file into a set of Sector objects
:param file: Path to Sectors XLS file
"""
pass