-
Notifications
You must be signed in to change notification settings - Fork 0
Flight API
• new default(dataSet
, data
)
Name | Type |
---|---|
dataSet |
ADEME_2022 |
data |
DataI |
• Private
avgEmission: undefined
| number
• Private
data: DataI
• Private
dataSet: ADEME_2022
▸ getData(): DataI
Return the current data constants loaded
DataI
constant data loaded
▸ getDataset(): ADEME_2022
Return the inner data set name
ADEME_2022
constant data loaded
▸ getEmissionAvg(): number
Return the average co2 estimation in peq.kgCO2e/year.
description
This constant is the ratio emission(2019)/#passengers(2019) from
the Directorate General of Civil Aviation (DGAC).
number
The average co2 emission in peq.kgCO2e/year.
▸ getEmissionEstimated(travel
, nbFlights
): number
Compute the co2 emissions from air travels in kgCO2e/year
description
Firstly the distances are calculated between the airports selected, then we
use the factor emission expressed in kgCO2e/peq.km (peq = person equivalent) to
get our first estimation per equivalent person:
- Emission = Distance * Factor
- [kgCO2e/year] = [Km/year] * [kgCO2e/km]
Finally, we add a factor depending on the class of the seat taken (economy class, business class, first class).
Name | Type | Description |
---|---|---|
travel |
FlightI |
- |
nbFlights |
number |
the number of flight made a year. |
number
the estimated flight emissions for the passengers in kgCO2e -1 in case of error (e.g. missing IATA airport)
▸ getHaulFactor(distance
): number
Retrieve the emission factor from the flight distance
Name | Type | Description |
---|---|---|
distance |
number |
distance of the flight in Km |
number
emission factor in kgCO2e/peq.km
▸ Static
build(dataset
): default
Create a calculator instance from dataset
Name | Type |
---|---|
dataset |
ADEME_2022 |
new House calculator - Throw error if dataset not loaded.
License MIT © Compte CO2 - M.J-L