Changeset 591:347c98077c1f
- Timestamp:
- 12/23/14 09:09:13 (10 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/acft.py
r539 r591 91 91 return _classes[flight.aircraftType](flight) 92 92 93 def __init__(self, flight ):93 def __init__(self, flight, minLandingFuel = None): 94 94 """Construct the aircraft for the given type.""" 95 95 self._flight = flight 96 self._minLandingFuel = minLandingFuel 96 97 97 98 self._name = None … … 359 360 self.logger.message(aircraftState.timestamp, "Flight time end") 360 361 self._flight.logFuel(aircraftState) 362 if self._minLandingFuel is not None and \ 363 aircraftState.totalFuel<self._minLandingFuel: 364 self._flight.handleNoGo(self.__class__, 365 aircraftState.timestamp, 366 "The amount of the landing fuel is less than the minimum for this type: %ukgs" % 367 (self._minLandingFuel,), 368 "LANDING FUEL NO GO") 361 369 self.logger.message(aircraftState.timestamp, 362 370 "Landing weight: %.0f kg, MLW: %.0f" % \ … … 631 639 - n1: left, right 632 640 - reverser: left, right""" 633 def __init__(self, flight ):634 super(Boeing737, self).__init__(flight )641 def __init__(self, flight, minLandingFuel = 2500): 642 super(Boeing737, self).__init__(flight, minLandingFuel = minLandingFuel) 635 643 636 644 self.gearSpeedLimit = 270 … … 692 700 #--------------------------------------------------------------------------------------- 693 701 694 class B733(Boeing737): 702 class Boeing737CL(Boeing737): 703 """Base class for the various aircraft in the Boeing 737 Classic family.""" 704 def __init__(self, flight): 705 super(Boeing737CL, self).__init__(flight, minLandingFuel = 3500) 706 707 #--------------------------------------------------------------------------------------- 708 709 class B733(Boeing737CL): 695 710 """Boeing 737-300 aircraft.""" 696 711 def __init__(self, flight): … … 703 718 #--------------------------------------------------------------------------------------- 704 719 705 class B734(Boeing737 ):720 class B734(Boeing737CL): 706 721 """Boeing 737-400 aircraft.""" 707 722 def __init__(self, flight): … … 714 729 #--------------------------------------------------------------------------------------- 715 730 716 class B735(Boeing737 ):731 class B735(Boeing737CL): 717 732 """Boeing 737-500 aircraft.""" 718 733 def __init__(self, flight): … … 735 750 736 751 def __init__(self, flight): 737 super(DH8D, self).__init__(flight )752 super(DH8D, self).__init__(flight, minLandingFuel = 2000) 738 753 self.dow = 17185 739 754 self.mtow = 29257 … … 757 772 - reverser: left, right""" 758 773 759 def __init__(self, flight ):760 super(Boeing767, self).__init__(flight )774 def __init__(self, flight, minLandingFuel = 9000): 775 super(Boeing767, self).__init__(flight, minLandingFuel = minLandingFuel) 761 776 self.gearSpeedLimit = 270 762 777 self.flapSpeedLimits = { 1 : 255, … … 805 820 - reverser: left, right.""" 806 821 def __init__(self, flight): 807 super(CRJ2, self).__init__(flight )822 super(CRJ2, self).__init__(flight, minLandingFuel = 1000) 808 823 self.dow = 14549 809 824 self.mtow = 22995 … … 827 842 - reverser: left, right.""" 828 843 def __init__(self, flight): 829 super(F70, self).__init__(flight )844 super(F70, self).__init__(flight, minLandingFuel = 1900) 830 845 self.dow = 24283 831 846 self.mtow = 38100 # FIXME: differentiate by registration number, … … 886 901 - reverser: left, right.""" 887 902 def __init__(self, flight): 888 super(T134, self).__init__(flight )903 super(T134, self).__init__(flight, minLandingFuel = 3000) 889 904 self.dow = 29500 890 905 self.mtow = 49000 … … 932 947 - reverser: left, right""" 933 948 def __init__(self, flight): 934 super(T154, self).__init__(flight )949 super(T154, self).__init__(flight, minLandingFuel = 5000) 935 950 self.dow = 53259 936 951 self.mtow = 98000
Note:
See TracChangeset
for help on using the changeset viewer.