Changeset 262:16f4855e111a for src/mlx
- Timestamp:
- 06/27/12 17:31:51 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/flight.py
r241 r262 83 83 84 84 @property 85 def cargoWeight(self): 86 """Get the cargo weight for the flight.""" 87 return self._gui.cargoWeight 88 89 @property 85 90 def zfw(self): 86 91 """Get the Zero-Fuel Weight of the flight.""" … … 88 93 89 94 @property 95 def filedCruiseAltitude(self): 96 """Get the filed cruise altitude.""" 97 return self._gui.filedCruiseAltitude 98 99 @property 90 100 def cruiseAltitude(self): 91 101 """Get the cruise altitude of the flight.""" … … 93 103 94 104 @property 105 def route(self): 106 """Get the route of the flight.""" 107 return self._gui.route 108 109 @property 110 def departureMETAR(self): 111 """Get the departure METAR of the flight.""" 112 return self._gui.departureMETAR 113 114 @property 115 def arrivalMETAR(self): 116 """Get the arrival METAR of the flight.""" 117 return self._gui.arrivalMETAR 118 119 @property 120 def departureRunway(self): 121 """Get the departure runway.""" 122 return self._gui.departureRunway 123 124 @property 125 def sid(self): 126 """Get the SID followed.""" 127 return self._gui.sid 128 129 @property 95 130 def v1(self): 96 131 """Get the V1 speed of the flight.""" … … 108 143 109 144 @property 145 def star(self): 146 """Get the STAR planned.""" 147 return self._gui.star 148 149 @property 150 def transition(self): 151 """Get the transition planned.""" 152 return self._gui.transition 153 154 @property 155 def approachType(self): 156 """Get the approach type.""" 157 return self._gui.approachType 158 159 @property 160 def arrivalRunway(self): 161 """Get the arrival runway.""" 162 return self._gui.arrivalRunway 163 164 @property 110 165 def vref(self): 111 166 """Get the VRef speed of the flight.""" … … 116 171 """Get the touchdown rate if known, None otherwise.""" 117 172 return self._tdRate 173 174 @property 175 def flightType(self): 176 """Get the type of the flight.""" 177 return self._gui.flightType 178 179 @property 180 def online(self): 181 """Get whether the flight was an online flight.""" 182 return self._gui.online 183 184 @property 185 def comments(self): 186 """Get the comments made by the pilot.""" 187 return self._gui.comments 188 189 @property 190 def flightDefects(self): 191 """Get the flight defects reported by the pilot.""" 192 return self._gui.flightDefects 193 194 @property 195 def delayCodes(self): 196 """Get the delay codes.""" 197 return self._gui.delayCodes 118 198 119 199 @property -
src/mlx/gui/flight.py
r242 r262 2546 2546 2547 2547 if result==RESPONSETYPE_OK: 2548 pirep = PIREP(gui )2548 pirep = PIREP(gui.flight) 2549 2549 2550 2550 self._lastSavePath = text2unicode(dialog.get_filename()) … … 2603 2603 def _sendClicked(self, button): 2604 2604 """Called when the Send button is clicked.""" 2605 pirep = PIREP(self._wizard.gui )2605 pirep = PIREP(self._wizard.gui.flight) 2606 2606 self._wizard.gui.sendPIREP(pirep, 2607 2607 callback = self._handlePIREPSent) -
src/mlx/pirep.py
r220 r262 39 39 return None 40 40 41 def __init__(self, gui):42 """Initialize the PIREP from the given GUI."""43 self.bookedFlight = gui.bookedFlight44 self.cargoWeight = gui.cargoWeight41 def __init__(self, flight): 42 """Initialize the PIREP from the given flight.""" 43 self.bookedFlight = flight.bookedFlight 44 self.cargoWeight = flight.cargoWeight 45 45 46 self.filedCruiseAltitude = gui.filedCruiseAltitude47 self.cruiseAltitude = gui.cruiseAltitude48 self.route = gui.route46 self.filedCruiseAltitude = flight.filedCruiseAltitude 47 self.cruiseAltitude = flight.cruiseAltitude 48 self.route = flight.route 49 49 50 self.departureMETAR = gui.departureMETAR.upper()51 self.arrivalMETAR = gui.arrivalMETAR.upper()50 self.departureMETAR = flight.departureMETAR.upper() 51 self.arrivalMETAR = flight.arrivalMETAR.upper() 52 52 53 self.departureRunway = gui.departureRunway.upper()54 self.sid = gui.sid.upper()53 self.departureRunway = flight.departureRunway.upper() 54 self.sid = flight.sid.upper() 55 55 56 self.star = gui.star57 self.transition = gui.transition58 self.approachType = gui.approachType.upper()59 self.arrivalRunway = gui.arrivalRunway.upper()56 self.star = flight.star 57 self.transition = flight.transition 58 self.approachType = flight.approachType.upper() 59 self.arrivalRunway = flight.arrivalRunway.upper() 60 60 61 self.flightType = gui.flightType62 self.online = gui.online61 self.flightType = flight.flightType 62 self.online = flight.online 63 63 64 self.comments = gui.comments65 self.flightDefects = gui.flightDefects66 self.delayCodes = gui.delayCodes64 self.comments = flight.comments 65 self.flightDefects = flight.flightDefects 66 self.delayCodes = flight.delayCodes 67 67 68 flight = gui.flight69 68 self.blockTimeStart = flight.blockTimeStart 70 69 self.flightTimeStart = flight.flightTimeStart … … 74 73 self.fuelUsed = flight.startFuel - flight.endFuel 75 74 76 logger = gui.logger75 logger = flight.logger 77 76 self.rating = logger.getRating() 78 77 self.logLines = logger.lines
Note:
See TracChangeset
for help on using the changeset viewer.