Changeset 778:102c31aa3d55 for src/mlx


Ignore:
Timestamp:
05/22/16 06:23:40 (9 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Some other data is also sent with the PIREP (re #285)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/pirep.py

    r743 r778  
    104104
    105105    @property
     106    def flightDateText(self):
     107        """Get the text version of the booked flight's departure time."""
     108        return self.bookedFlight.departureTime.strftime("%Y-%m-%d")
     109
     110    @property
    106111    def flightTypeText(self):
    107112        """Get the text representation of the flight type."""
     
    194199        attrs = {}
    195200        attrs["log"] = self.getACARSText()
     201        attrs["flightDate"] = self.flightDateText
     202        attrs["callsign"] = self.bookedFlight.callsign
     203        attrs["departureICAO"] = self.bookedFlight.departureICAO
     204        attrs["arrivalICAO"] = self.bookedFlight.arrivalICAO
    196205        attrs["numPassengers"] = self.numPassengers
    197206        attrs["numCrew"] = self.numCrew
     
    223232        attrs["flownDistance"] = self.flownDistance
    224233        # FIXME: it should be stored in the PIREP when it is sent later
    225         attrs["flightDate"] = datetime.date.today().strftime("%Y-%m-%d")
     234        attrs["performDate"] = datetime.date.today().strftime("%Y-%m-%d")
    226235
    227236        return ([], attrs)
Note: See TracChangeset for help on using the changeset viewer.