Flight¶
A flight is one of the main building blocks in Aerios. A flight is defined by an aircraft taking a uni-directional journey from one airport to another.
-
class
aerios.flight.
Flight
(airports, airplane)[source]¶ Flight constructor.
- Parameters
airports (list) – A list of two airports, defined as strings by their IATA codes. The first airport denotes the
origin
, whilst the second airport denotes thedestination
. An example of this input is['DOH', 'DCA']
.airplane (string) – This can be the type of the aircraft, i.e.,
boeing 747-400
, orairbus a380
or its registration i.e.,A6-EDB
. Typically, aircraft types will have the manufacturer’s name first followed by a space and then the type of aircraft.
Sample constructor initialisations:
import aerios as ae # Create a flight between Doha and Washington-Regean for aircraft registration A6-EDB myflight = ae.Flight(airports=['DOH', 'DCA'], airplane='A6-EDB') # Create a flight between London Heathrow and Paris Orly for a boeing 737 myflight = ae.Flight(airports=['LHR', 'ORY'], airplane='boeing 737')