define the arrival waypoint with time information
This commit is contained in:
25
aman/types/ArrivalWaypoint.py
Normal file
25
aman/types/ArrivalWaypoint.py
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
class ArrivalWaypoint():
|
||||||
|
def __init__(self, **kwargs):
|
||||||
|
self.Waypoint = None
|
||||||
|
self.FlightTime = None
|
||||||
|
self.Trackmiles = None
|
||||||
|
self.ETA = None
|
||||||
|
self.PTA = None
|
||||||
|
|
||||||
|
for key, value in kwargs.items():
|
||||||
|
if 'waypoint' == key.lower():
|
||||||
|
self.Waypoint = value
|
||||||
|
elif 'flighttime' == key.lower():
|
||||||
|
self.FlightTime = value
|
||||||
|
elif 'eta' == key.lower():
|
||||||
|
self.ETA = value
|
||||||
|
elif 'pta' == key.lower():
|
||||||
|
self.PTA = value
|
||||||
|
elif 'trackmiles' == key.lower():
|
||||||
|
self.Trackmiles = value
|
||||||
|
else:
|
||||||
|
raise Exception('Invalid constructor argument: ' + key)
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user