ArrivalWaypoint.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/bin/env python
  2. class ArrivalWaypoint():
  3. def __init__(self, **kwargs):
  4. self.Waypoint = None
  5. self.FlightTime = None
  6. self.Trackmiles = None
  7. self.IndicatedAirspeed = None
  8. self.GroundSpeed = None
  9. self.Altitude = None
  10. self.ETA = None
  11. self.PTA = None
  12. for key, value in kwargs.items():
  13. if 'waypoint' == key.lower():
  14. self.Waypoint = value
  15. elif 'flighttime' == key.lower():
  16. self.FlightTime = value
  17. elif 'eta' == key.lower():
  18. self.ETA = value
  19. elif 'pta' == key.lower():
  20. self.PTA = value
  21. elif 'trackmiles' == key.lower():
  22. self.Trackmiles = value
  23. elif 'altitude' == key.lower():
  24. self.Altitude = value
  25. elif 'groundspeed' == key.lower():
  26. self.GroundSpeed = value
  27. elif 'indicated' == key.lower():
  28. self.IndicatedAirspeed = value
  29. else:
  30. raise Exception('Invalid constructor argument: ' + key)