123456789101112131415161718192021222324252627282930 |
- #!/usr/bin/env python
- class PerformanceData:
- def __init__(self, icao : str):
- self.Icao = icao
- self.SpeedAboveFL240 = 0.0
- self.SpeedAboveFL100 = 0.0
- self.SpeedBelowFL100 = 0.0
- self.SpeedApproach = 0.0
- self.RodAboveFL240 = 0.0
- self.RodAboveFL100 = 0.0
- self.RodBelowFL100 = 2000.0
- def ias(self, altitude, distance):
- if 24000 < altitude:
- return self.SpeedAboveFL240
- elif 10000 < altitude:
- return self.SpeedAboveFL100
- elif 10000 >= altitude and 5 < distance:
- return self.SpeedBelowFL100
- elif 5 >= distance:
- return self.SpeedApproach
- else:
- return self.SpeedBelowFL100
- def __str__(self):
- return 'ICAO: ' + self.icao + ', FL240: ' + str(self.RodAboveFL240) + '@' + str(self.SpeedAboveFL240) + \
- ', +FL100: ' + str(self.RodAboveFL100) + '@' + str(self.SpeedAboveFL100) + \
- ', -FL100: ' + str(self.RodBelowFL100) + '@' + str(self.SpeedBelowFL100) + \
- ', Vapp: ' + str(self.SpeedApproach)
|