Changeset 191:b23bf6aa7672
- Timestamp:
- 05/18/12 15:19:28 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/acft.py
r184 r191 735 735 #--------------------------------------------------------------------------------------- 736 736 737 _classes = { const.AIRCRAFT_B736 : B736, 738 const.AIRCRAFT_B737 : B737, 739 const.AIRCRAFT_B738 : B738, 740 const.AIRCRAFT_B733 : B733, 741 const.AIRCRAFT_B734 : B734, 742 const.AIRCRAFT_B735 : B735, 743 const.AIRCRAFT_DH8D : DH8D, 744 const.AIRCRAFT_B762 : B762, 745 const.AIRCRAFT_B763 : B763, 746 const.AIRCRAFT_CRJ2 : CRJ2, 747 const.AIRCRAFT_F70 : F70, 748 const.AIRCRAFT_DC3 : DC3, 749 const.AIRCRAFT_T134 : T134, 750 const.AIRCRAFT_T154 : T154, 751 const.AIRCRAFT_YK40 : YK40 } 752 753 #--------------------------------------------------------------------------------------- 737 _classes = { const.AIRCRAFT_B736 : B736, 738 const.AIRCRAFT_B737 : B737, 739 const.AIRCRAFT_B738 : B738, 740 const.AIRCRAFT_B738C : B738Charter, 741 const.AIRCRAFT_B733 : B733, 742 const.AIRCRAFT_B734 : B734, 743 const.AIRCRAFT_B735 : B735, 744 const.AIRCRAFT_DH8D : DH8D, 745 const.AIRCRAFT_B762 : B762, 746 const.AIRCRAFT_B763 : B763, 747 const.AIRCRAFT_CRJ2 : CRJ2, 748 const.AIRCRAFT_F70 : F70, 749 const.AIRCRAFT_DC3 : DC3, 750 const.AIRCRAFT_T134 : T134, 751 const.AIRCRAFT_T154 : T154, 752 const.AIRCRAFT_YK40 : YK40 } 753 754 #--------------------------------------------------------------------------------------- -
src/mlx/checks.py
r184 r191 831 831 def isCondition(self, flight, aircraft, oldState, state): 832 832 """Check if the fault condition holds.""" 833 833 return not flight.entranceExam and \ 834 834 flight.stage==const.STAGE_PUSHANDTAXI and \ 835 835 PayloadChecker.isZFWFaulty(state.zfw, flight.zfw) -
src/mlx/const.py
r187 r191 41 41 # Aircraft type: Boeing 737-800 42 42 AIRCRAFT_B738 = 3 43 44 # Aircraft type: Boeing 737-800 (charter configuration) 45 AIRCRAFT_B738C = 16 43 46 44 47 # Aircraft type: Boeing 737-300 … … 83 86 # The order is mostly from most recent to oldest considering 84 87 # Malev's history 85 aircraftTypes = [AIRCRAFT_B736, AIRCRAFT_B737, AIRCRAFT_B738, 88 aircraftTypes = [AIRCRAFT_B736, AIRCRAFT_B737, 89 AIRCRAFT_B738, AIRCRAFT_B738C, 86 90 AIRCRAFT_DH8D, 87 91 AIRCRAFT_F70, AIRCRAFT_CRJ2, … … 93 97 #------------------------------------------------------------------------------- 94 98 95 # A mapping of aircraft types to their ICAO codes 96 icaoCodes = { AIRCRAFT_B736 : "B736", 97 AIRCRAFT_B737 : "B737", 98 AIRCRAFT_B738 : "B738", 99 AIRCRAFT_B733 : "B733", 100 AIRCRAFT_B734 : "B734", 101 AIRCRAFT_B735 : "B735", 102 AIRCRAFT_DH8D : "DH8D", 103 AIRCRAFT_B762 : "B762", 104 AIRCRAFT_B763 : "B763", 105 AIRCRAFT_CRJ2 : "CRJ2", 106 AIRCRAFT_F70 : "F70", 107 AIRCRAFT_DC3 : "DC3", 108 AIRCRAFT_T134 : "T134", 109 AIRCRAFT_T154 : "T154", 110 AIRCRAFT_YK40 : "YK40" } 99 # A mapping of aircraft types to their 'internal' ICAO codes (which are 100 # the same as the real ICAO codes, except in a few cases) 101 icaoCodes = { AIRCRAFT_B736 : "B736", 102 AIRCRAFT_B737 : "B737", 103 AIRCRAFT_B738 : "B738", 104 AIRCRAFT_B738C : "B738C", 105 AIRCRAFT_B733 : "B733", 106 AIRCRAFT_B734 : "B734", 107 AIRCRAFT_B735 : "B735", 108 AIRCRAFT_DH8D : "DH8D", 109 AIRCRAFT_B762 : "B762", 110 AIRCRAFT_B763 : "B763", 111 AIRCRAFT_CRJ2 : "CRJ2", 112 AIRCRAFT_F70 : "F70", 113 AIRCRAFT_DC3 : "DC3", 114 AIRCRAFT_T134 : "T134", 115 AIRCRAFT_T154 : "T154", 116 AIRCRAFT_YK40 : "YK40" } 111 117 112 118 #------------------------------------------------------------------------------- -
src/mlx/fsuipc.py
r168 r191 1450 1450 return aircraft.type in [const.AIRCRAFT_B736, 1451 1451 const.AIRCRAFT_B737, 1452 const.AIRCRAFT_B738] and \ 1452 const.AIRCRAFT_B738, 1453 const.AIRCRAFT_B738C] and \ 1453 1454 (name.find("PMDG")!=-1 or airPath.find("PMDG")!=-1) and \ 1454 1455 (name.find("737")!=-1 or airPath.find("737")!=-1) and \ … … 1648 1649 #------------------------------------------------------------------------------ 1649 1650 1650 _genericModels = { const.AIRCRAFT_B736 : B737Model, 1651 const.AIRCRAFT_B737 : B737Model, 1652 const.AIRCRAFT_B738 : B737Model, 1653 const.AIRCRAFT_B733 : B737Model, 1654 const.AIRCRAFT_B734 : B737Model, 1655 const.AIRCRAFT_B735 : B737Model, 1656 const.AIRCRAFT_DH8D : DH8DModel, 1657 const.AIRCRAFT_B762 : B767Model, 1658 const.AIRCRAFT_B763 : B767Model, 1659 const.AIRCRAFT_CRJ2 : B767Model, 1660 const.AIRCRAFT_F70 : F70Model, 1661 const.AIRCRAFT_DC3 : DC3Model, 1662 const.AIRCRAFT_T134 : T134Model, 1663 const.AIRCRAFT_T154 : T154Model, 1664 const.AIRCRAFT_YK40 : YK40Model } 1651 _genericModels = { const.AIRCRAFT_B736 : B737Model, 1652 const.AIRCRAFT_B737 : B737Model, 1653 const.AIRCRAFT_B738 : B737Model, 1654 const.AIRCRAFT_B738C : B737Model, 1655 const.AIRCRAFT_B733 : B737Model, 1656 const.AIRCRAFT_B734 : B737Model, 1657 const.AIRCRAFT_B735 : B737Model, 1658 const.AIRCRAFT_DH8D : DH8DModel, 1659 const.AIRCRAFT_B762 : B767Model, 1660 const.AIRCRAFT_B763 : B767Model, 1661 const.AIRCRAFT_CRJ2 : B767Model, 1662 const.AIRCRAFT_F70 : F70Model, 1663 const.AIRCRAFT_DC3 : DC3Model, 1664 const.AIRCRAFT_T134 : T134Model, 1665 const.AIRCRAFT_T154 : T154Model, 1666 const.AIRCRAFT_YK40 : YK40Model } 1665 1667 1666 1668 #------------------------------------------------------------------------------ -
src/mlx/gui/common.py
r175 r191 201 201 202 202 # A mapping of aircraft types to their screen names 203 aircraftNames = { _const.AIRCRAFT_B736 : xstr("aircraft_b736"), 204 _const.AIRCRAFT_B737 : xstr("aircraft_b737"), 205 _const.AIRCRAFT_B738 : xstr("aircraft_b738"), 206 _const.AIRCRAFT_B733 : xstr("aircraft_b733"), 207 _const.AIRCRAFT_B734 : xstr("aircraft_b734"), 208 _const.AIRCRAFT_B735 : xstr("aircraft_b735"), 209 _const.AIRCRAFT_DH8D : xstr("aircraft_dh8d"), 210 _const.AIRCRAFT_B762 : xstr("aircraft_b762"), 211 _const.AIRCRAFT_B763 : xstr("aircraft_b763"), 212 _const.AIRCRAFT_CRJ2 : xstr("aircraft_crj2"), 213 _const.AIRCRAFT_F70 : xstr("aircraft_f70"), 214 _const.AIRCRAFT_DC3 : xstr("aircraft_dc3"), 215 _const.AIRCRAFT_T134 : xstr("aircraft_t134"), 216 _const.AIRCRAFT_T154 : xstr("aircraft_t154"), 217 _const.AIRCRAFT_YK40 : xstr("aircraft_yk40") } 218 219 #------------------------------------------------------------------------------ 203 aircraftNames = { _const.AIRCRAFT_B736 : xstr("aircraft_b736"), 204 _const.AIRCRAFT_B737 : xstr("aircraft_b737"), 205 _const.AIRCRAFT_B738 : xstr("aircraft_b738"), 206 _const.AIRCRAFT_B738C : xstr("aircraft_b738c"), 207 _const.AIRCRAFT_B733 : xstr("aircraft_b733"), 208 _const.AIRCRAFT_B734 : xstr("aircraft_b734"), 209 _const.AIRCRAFT_B735 : xstr("aircraft_b735"), 210 _const.AIRCRAFT_DH8D : xstr("aircraft_dh8d"), 211 _const.AIRCRAFT_B762 : xstr("aircraft_b762"), 212 _const.AIRCRAFT_B763 : xstr("aircraft_b763"), 213 _const.AIRCRAFT_CRJ2 : xstr("aircraft_crj2"), 214 _const.AIRCRAFT_F70 : xstr("aircraft_f70"), 215 _const.AIRCRAFT_DC3 : xstr("aircraft_dc3"), 216 _const.AIRCRAFT_T134 : xstr("aircraft_t134"), 217 _const.AIRCRAFT_T154 : xstr("aircraft_t154"), 218 _const.AIRCRAFT_YK40 : xstr("aircraft_yk40") } 219 220 #------------------------------------------------------------------------------ -
src/mlx/gui/flight.py
r184 r191 15 15 import datetime 16 16 import time 17 18 #------------------------------------------------------------------------------19 20 acftTypeNames = { const.AIRCRAFT_B736: "Boeing 737-600",21 const.AIRCRAFT_B737: "Boeing 737-700",22 const.AIRCRAFT_B738: "Boeing 737-800",23 const.AIRCRAFT_DH8D: "Bombardier Dash 8-Q400",24 const.AIRCRAFT_B733: "Boeing 737-300",25 const.AIRCRAFT_B734: "Boeing 737-400",26 const.AIRCRAFT_B735: "Boeing 737-500",27 const.AIRCRAFT_B762: "Boeing 767-200",28 const.AIRCRAFT_B763: "Boeing 767-300",29 const.AIRCRAFT_CRJ2: "Bombardier CRJ200",30 const.AIRCRAFT_F70: "Fokker 70",31 const.AIRCRAFT_DC3: "Lisunov Li-2",32 const.AIRCRAFT_T134: "Tupolev Tu-134",33 const.AIRCRAFT_T154: "Tupolev Tu-154",34 const.AIRCRAFT_YK40: "Yakovlev Yak-40" }35 17 36 18 #----------------------------------------------------------------------------- … … 688 670 labelAlignment = gtk.Alignment(xalign=0.0, xscale=0.0) 689 671 self._flightNumber = gtk.Label() 690 self._flightNumber.set_width_chars( 7)672 self._flightNumber.set_width_chars(9) 691 673 self._flightNumber.set_alignment(0.0, 0.5) 692 674 labelAlignment.add(self._flightNumber) … … 759 741 self._flightNumber.set_markup("<b>" + bookedFlight.callsign + "</b>") 760 742 761 aircraftType = a cftTypeNames[bookedFlight.aircraftType]743 aircraftType = aircraftNames[bookedFlight.aircraftType] 762 744 self._aircraft.set_markup("<b>" + aircraftType + "</b>") 763 745 -
src/mlx/i18n.py
r190 r191 132 132 def initialize(self): 133 133 """Initialize the strings.""" 134 self.add("aircraft_b736", "Boeing 737-600") 135 self.add("aircraft_b737", "Boeing 737-700") 136 self.add("aircraft_b738", "Boeing 737-800") 137 self.add("aircraft_b733", "Boeing 737-300") 138 self.add("aircraft_b734", "Boeing 737-400") 139 self.add("aircraft_b735", "Boeing 737-500") 140 self.add("aircraft_dh8d", "Bombardier Dash 8 Q400") 141 self.add("aircraft_b762", "Boeing 767-200") 142 self.add("aircraft_b763", "Boeing 767-300") 143 self.add("aircraft_crj2", "Canadair Regional Jet CRJ-200") 144 self.add("aircraft_f70", "Fokker F70") 145 self.add("aircraft_dc3", "Lisunov Li-2") 146 self.add("aircraft_t134", "Tupolev Tu-134") 147 self.add("aircraft_t154", "Tupolev Tu-154") 148 self.add("aircraft_yk40", "Yakovlev Yak-40") 134 self.add("aircraft_b736", "Boeing 737-600") 135 self.add("aircraft_b737", "Boeing 737-700") 136 self.add("aircraft_b738", "Boeing 737-800") 137 self.add("aircraft_b738c", "Boeing 737-800 (charter)") 138 self.add("aircraft_b733", "Boeing 737-300") 139 self.add("aircraft_b734", "Boeing 737-400") 140 self.add("aircraft_b735", "Boeing 737-500") 141 self.add("aircraft_dh8d", "Bombardier Dash 8 Q400") 142 self.add("aircraft_b762", "Boeing 767-200") 143 self.add("aircraft_b763", "Boeing 767-300") 144 self.add("aircraft_crj2", "Canadair Regional Jet CRJ-200") 145 self.add("aircraft_f70", "Fokker F70") 146 self.add("aircraft_dc3", "Lisunov Li-2") 147 self.add("aircraft_t134", "Tupolev Tu-134") 148 self.add("aircraft_t154", "Tupolev Tu-154") 149 self.add("aircraft_yk40", "Yakovlev Yak-40") 149 150 150 151 self.add("file_filter_all", "All files") … … 829 830 def initialize(self): 830 831 """Initialize the strings.""" 831 self.add("aircraft_b736", "Boeing 737-600") 832 self.add("aircraft_b737", "Boeing 737-700") 833 self.add("aircraft_b738", "Boeing 737-800") 834 self.add("aircraft_b733", "Boeing 737-300") 835 self.add("aircraft_b734", "Boeing 737-400") 836 self.add("aircraft_b735", "Boeing 737-500") 837 self.add("aircraft_dh8d", "Bombardier Dash 8 Q400") 838 self.add("aircraft_b762", "Boeing 767-200") 839 self.add("aircraft_b763", "Boeing 767-300") 840 self.add("aircraft_crj2", "Canadair Regional Jet CRJ-200") 841 self.add("aircraft_f70", "Fokker F70") 842 self.add("aircraft_dc3", "Liszunov Li-2") 843 self.add("aircraft_t134", "Tupoljev Tu-134") 844 self.add("aircraft_t154", "Tupoljev Tu-154") 845 self.add("aircraft_yk40", "Jakovlev Jak-40") 832 self.add("aircraft_b736", "Boeing 737-600") 833 self.add("aircraft_b737", "Boeing 737-700") 834 self.add("aircraft_b738", "Boeing 737-800") 835 self.add("aircraft_b738c", "Boeing 737-800 (charter)") 836 self.add("aircraft_b733", "Boeing 737-300") 837 self.add("aircraft_b734", "Boeing 737-400") 838 self.add("aircraft_b735", "Boeing 737-500") 839 self.add("aircraft_dh8d", "Bombardier Dash 8 Q400") 840 self.add("aircraft_b762", "Boeing 767-200") 841 self.add("aircraft_b763", "Boeing 767-300") 842 self.add("aircraft_crj2", "Canadair Regional Jet CRJ-200") 843 self.add("aircraft_f70", "Fokker F70") 844 self.add("aircraft_dc3", "Liszunov Li-2") 845 self.add("aircraft_t134", "Tupoljev Tu-134") 846 self.add("aircraft_t154", "Tupoljev Tu-154") 847 self.add("aircraft_yk40", "Jakovlev Jak-40") 846 848 847 849 self.add("file_filter_all", "Összes fájl") -
src/mlx/soundsched.py
r176 r191 120 120 played.""" 121 121 122 _sounds = { const.AIRCRAFT_B736 : const.SOUND_TAXI_BOEING737NG, 123 const.AIRCRAFT_B737 : const.SOUND_TAXI_BOEING737NG, 124 const.AIRCRAFT_B738 : const.SOUND_TAXI_BOEING737NG, 125 const.AIRCRAFT_B762 : const.SOUND_TAXI_BOEING767, 126 const.AIRCRAFT_B763 : const.SOUND_TAXI_BOEING767, 127 const.AIRCRAFT_F70 : const.SOUND_TAXI_F70 } 128 122 _sounds = { const.AIRCRAFT_B736 : const.SOUND_TAXI_BOEING737NG, 123 const.AIRCRAFT_B737 : const.SOUND_TAXI_BOEING737NG, 124 const.AIRCRAFT_B738 : const.SOUND_TAXI_BOEING737NG, 125 const.AIRCRAFT_B738C : const.SOUND_TAXI_BOEING737NG, 126 const.AIRCRAFT_B762 : const.SOUND_TAXI_BOEING767, 127 const.AIRCRAFT_B763 : const.SOUND_TAXI_BOEING767, 128 const.AIRCRAFT_F70 : const.SOUND_TAXI_F70 } 129 129 130 def __init__(self, flight, boardingSound = None): 130 131 """Construct the taxi sound.""" -
src/mlx/web.py
r188 r191 34 34 class BookedFlight(object): 35 35 """A flight that was booked.""" 36 TYPECODE2TYPE = { "736" : const.AIRCRAFT_B736, 37 "73G" : const.AIRCRAFT_B737, 38 "738" : const.AIRCRAFT_B738, 39 "733" : const.AIRCRAFT_B733, 40 "734" : const.AIRCRAFT_B734, 41 "735" : const.AIRCRAFT_B735, 42 "DH4" : const.AIRCRAFT_DH8D, 43 "762" : const.AIRCRAFT_B762, 44 "763" : const.AIRCRAFT_B763, 45 "CR2" : const.AIRCRAFT_CRJ2, 46 "F70" : const.AIRCRAFT_F70, 47 "LI2" : const.AIRCRAFT_DC3, 48 "TU3" : const.AIRCRAFT_T134, 49 "TU5" : const.AIRCRAFT_T154, 50 "YK4" : const.AIRCRAFT_YK40 } 51 52 TYPE2TYPECODE = { const.AIRCRAFT_B736 : "736", 53 const.AIRCRAFT_B737 : "73G", 54 const.AIRCRAFT_B738 : "738", 55 const.AIRCRAFT_B733 : "733", 56 const.AIRCRAFT_B734 : "734", 57 const.AIRCRAFT_B735 : "735", 58 const.AIRCRAFT_DH8D : "DH4", 59 const.AIRCRAFT_B762 : "762", 60 const.AIRCRAFT_B763 : "763", 61 const.AIRCRAFT_CRJ2 : "CR2", 62 const.AIRCRAFT_F70 : "F70", 63 const.AIRCRAFT_DC3 : "LI2", 64 const.AIRCRAFT_T134 : "TU3", 65 const.AIRCRAFT_T154 : "TU5", 66 const.AIRCRAFT_YK40 : "YK4" } 36 TYPECODE2TYPE = { "736" : const.AIRCRAFT_B736, 37 "73G" : const.AIRCRAFT_B737, 38 "738" : const.AIRCRAFT_B738, 39 "73H" : const.AIRCRAFT_B738C, 40 "733" : const.AIRCRAFT_B733, 41 "734" : const.AIRCRAFT_B734, 42 "735" : const.AIRCRAFT_B735, 43 "DH4" : const.AIRCRAFT_DH8D, 44 "762" : const.AIRCRAFT_B762, 45 "763" : const.AIRCRAFT_B763, 46 "CR2" : const.AIRCRAFT_CRJ2, 47 "F70" : const.AIRCRAFT_F70, 48 "LI2" : const.AIRCRAFT_DC3, 49 "TU3" : const.AIRCRAFT_T134, 50 "TU5" : const.AIRCRAFT_T154, 51 "YK4" : const.AIRCRAFT_YK40 } 52 53 TYPE2TYPECODE = { const.AIRCRAFT_B736 : "736", 54 const.AIRCRAFT_B737 : "73G", 55 const.AIRCRAFT_B738 : "738", 56 const.AIRCRAFT_B738C : "73H", 57 const.AIRCRAFT_B733 : "733", 58 const.AIRCRAFT_B734 : "734", 59 const.AIRCRAFT_B735 : "735", 60 const.AIRCRAFT_DH8D : "DH4", 61 const.AIRCRAFT_B762 : "762", 62 const.AIRCRAFT_B763 : "763", 63 const.AIRCRAFT_CRJ2 : "CR2", 64 const.AIRCRAFT_F70 : "F70", 65 const.AIRCRAFT_DC3 : "LI2", 66 const.AIRCRAFT_T134 : "TU3", 67 const.AIRCRAFT_T154 : "TU5", 68 const.AIRCRAFT_YK40 : "YK4" } 67 69 68 70 @staticmethod
Note:
See TracChangeset
for help on using the changeset viewer.