From 7985dda3cef0465affdc38dcb8030b8fc6d66ee9 Mon Sep 17 00:00:00 2001 From: Sven Czarnian Date: Thu, 11 Nov 2021 20:22:03 +0100 Subject: [PATCH] define the arrival waypoint with time information --- aman/types/ArrivalWaypoint.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 aman/types/ArrivalWaypoint.py diff --git a/aman/types/ArrivalWaypoint.py b/aman/types/ArrivalWaypoint.py new file mode 100644 index 0000000..d301ba1 --- /dev/null +++ b/aman/types/ArrivalWaypoint.py @@ -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) + +