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 the destination. An example of this input is ['DOH', 'DCA'].

  • airplane (string) – This can be the type of the aircraft, i.e., boeing 747-400, or airbus 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')
get_fuel_data()[source]

Retrieves the fuel vs. range graph for a particular aircraft.

Parameters

self (Flight) – An instance of the Flight class.

get_fuel_estimate(output='kg')[source]

Returns the fuel estimate for the flight.

Parameters
  • self (Flight) – An instance of the Flight class.

  • output (string) – An input to specify whether the fuel estimate is given as kg or pounds; default is the former.