Intro

Building something with flight data? With this tool you can retrieve fuel consumption and carbon emissions of 53243 aircrafts. You need the ICAO24 code of the aircraft and the distance of the flight in nautical milles.

Click the link below and try a live example right now.

  https://despouy.ca/flight-fuel-api/q/?aircraft=60006b&distance=125

NEW in v0.6: Batch queries (go to section).

Methodology

Our calculations are based on ICAO's Carbon Emissions Calculator Methodology of 2018 (here). It consists of four parts: user input, distance correction, aircraft mapping and final calculations.

1) User input flight distance and aircraft

2) Flight distance is corrected by a factor depending on the distance (optional)

If you calculated the flight distance using great-circle distance (GCD, more info here), you can, and maybe you should, use the API's distance correction based on ICAO's methodology.

According to ICAO, "the correction factor is needed in order to include the emissions of distance flown in excess of the GCD, stacking, traffic and weather-driven corrections. According to EIG, the actual distance flown compared with GCD that is given in the scheduled flights timetable may vary up to 11% in Europe (ANCAT/EC2 1998)."

The table below shows the GCD correction factor used:

Distance Correction to distance
Less than 550 Km + 50 Km
Between 550 Km and 5500 Km + 100 Km
Above 5500 Km + 125 Km

3) Aircraft mapping

ICAO's calculations uses IATA type codes and our input is ICAO24. Using ICAO24 we take the ICAO code from OpenSky Network aircraft database (here), and that code we map it to its respective IATA type code (here).

The aircraft is linked to the aircraft fuel consumption database based on ICAO Fuel Consumption Formula. When the scheduled aircraft is not in the database, the aircraft is mapped into one of the 312 equivalent aircraft types existing in the aircraft fuel consumption database.

4.1) Fuel burn calculation

The fuel burn to flight distance relationship is extrapolated from the ICAO Fuel Consumption Formula.

4.2) Carbon emissions (CO₂) calculation

After calculating the fuel burn, we multiply by a constant representing the number of tonnes of CO₂ produced by burning a tonne of aviation fuel: 3.16

CO₂ per flight = 3.16 * total fuel

API

To query the API we need two parameters: the aircraft's ICAO24 code and the flight's distance in nautical milles. The following URL should be used:

https://despouy.ca/flight-fuel-api/q/?aircraft=ICAO24&distance=DISTANCE

If you are using great-circle distance and would like to correct the distance, you can add &gdc=true to the URL like this:

https://despouy.ca/flight-fuel-api/q/?aircraft=ICAO24&distance=DISTANCE&gcd=true

The results will be returned as a JSON with the following information:

key type definition
icao24 string ICAO24 code of aircraft queried
distance float distance queried in nautical milles
fuel float fuel consumption estimated in kilograms
co2 float CO₂ emissions estimated in kilograms
icao string ICAO code of aircraft queried
iata string IATA code of aircraft queried
model string model of aircraft queried
gcd boolean is great-circle distance used

For example, if we query the aircraft '60006b' (ICAO24 code) with a distance of 125 nautical milles we use the following URL:

https://despouy.ca/flight-fuel-api/q/?aircraft=60006b&distance=125

That will return us the following:

[
  {
"icao24":"60006b",
"distance":125,
"fuel":5605,
"co2":17711.8,
"icao":"B74R",
"iata":"74R",
"model":"Boeing 747SR",
"gcd":false
  }
]

NOTE: If you add &gcd=true to the URL, the distance showed will be after corrections, and the fuel and CO₂ will be calculated with the new distance. So, for the following URL:

https://despouy.ca/flight-fuel-api/q/?aircraft=60006b&distance=125&gcd=true

That will return us the following:

[
  {
"icao24":"60006b",
"distance":152,
"fuel":6880.16,
"co2":21741.31,
"icao":"B74R",
"iata":"74R",
"model":"Boeing 747SR",
"gcd":true
  }
]

Batch queries

If you want to calculate a batch of aircrafts, add a series of ICAO24 codes and distances. Make sure the number of aircrafts is the same as the number of distances. The series can be written as as array (e.g. [i1,i2]) or not (e.g. i1,i2). So, for the following URL:

https://despouy.ca/flight-fuel-api/q/?aircraft=[60006b,c06461]&distance=[125,200]

or

https://despouy.ca/flight-fuel-api/q/?aircraft=60006b,c06461&distance=125,200

Will return us the following:

[
  {
"icao24":"60006b",
"distance":125,
"fuel":5605.0,
"co2":17711.8,
"icao":"B74R",
"iata":"74R",
"model":"Boeing 747SR",
"gcd":false
  },
  {
"icao24":"c06461",
"distance":200.0,
"fuel":2936.0,
"co2":9277.76,
"icao":"B732",
"iata":"732",
"model":"Boeing 737-200",
"gcd":false
  }
]

Feedback

If you have any questions, please contact me via pedro[at]despouy.ca

Thank you,
Pedro