Skip to content

Commit

Permalink
Improved calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgecarleitao committed Jan 29, 2024
1 parent 80cfdec commit 2dfb2bc
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
8 changes: 4 additions & 4 deletions examples/country.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use num_format::{Locale, ToFormattedString};
use simple_logger::SimpleLogger;

use flights::{
emissions, leg_co2_kg, load_aircraft_consumption, load_aircrafts, load_private_jet_types,
AircraftTypeConsumptions, Class, Fact, Leg, Position,
emissions, leg_co2_kg, leg_co2_kg_per_person, load_aircraft_consumption, load_aircrafts,
load_private_jet_types, AircraftTypeConsumptions, Class, Fact, Leg, Position,
};
use time::Date;

Expand Down Expand Up @@ -393,7 +393,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
private_emissions(&legs, &consumptions, |leg| leg.distance() < 300.0);
let commercial_emissions_short = commercial_emissions(&legs, |leg| leg.distance() < 300.0);

let short_ratio = emissions_short_legs / commercial_emissions_short;
let short_ratio = leg_co2_kg_per_person(emissions_short_legs) / commercial_emissions_short;
let ratio_train_300km = Fact {
claim: (short_ratio + 7.0) as usize,
source: format!("{}x in comparison to a commercial flight[^1][^6] plus 7x of a commercial flight in comparison to a train, as per https://ourworldindata.org/travel-carbon-footprint (UK data, vary by country) - retrieved on 2024-01-20", short_ratio as usize),
Expand All @@ -406,7 +406,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
let commercial_emissions_long = commercial_emissions(&legs, |leg| leg.distance() >= 300.0);

let ratio_commercial_300km = Fact {
claim: (emissions_long_legs / commercial_emissions_long) as usize,
claim: (leg_co2_kg_per_person(emissions_long_legs) / commercial_emissions_long) as usize,
source: "Commercial flight emissions based on [myclimate.org](https://www.myclimate.org/en/information/about-myclimate/downloads/flight-emission-calculator/) - retrieved on 2023-10-19".to_string(),
date: now.to_string(),
};
Expand Down
12 changes: 11 additions & 1 deletion methodology.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ leg emissions [kg CO2e] =
x Radiative Forcing index [kg CO2e / kg CO2]
x Life-cycle emissions [kg CO2e / kg CO2e]
x leg time [h]
x occupancy [1/person]
```

Where:
Expand All @@ -114,6 +113,17 @@ Where:
* `Radiative Forcing index = 3 [kg CO2e / kg CO2]`, as concluded in [The contribution of global aviation to anthropogenic climate forcing for 2000 to 2018](https://www.sciencedirect.com/science/article/pii/S1352231020305689), from 2021.
* `Life-cycle emissions = 1.68 [kg CO2e / kg CO2e]`, [Life Cycle Greenhouse Gas Emissions from Alternative Jet Fuels v1.2](https://web.mit.edu/aeroastro/partner/reports/proj28/partner-proj28-2010-001.pdf) from 2010-06, accessed 2024-01-28.
* `leg time [h]` is obtained by computing duration of the leg, as identified via the methodology `M-4` in this document.

#### Per passager

```
leg emissions/person [kg CO2e/person] =
leg emissions [kg CO2e]
x occupancy [1/person]
```

where
* `leg emissions [kg CO2e]` is as computed above
* `occupancy = 0.23 [1/person] = 1/4.3 [1/person]` obtained from [Average number of passengers per flight who flew private worldwide from 2016 to 2019](https://www.statista.com/statistics/1171518/private-jet-per-flight/), where there were 4.3 passagers per flight in 2019, accessed 2024-01-28.

### M-8: Identify aircraft owner in Denmark
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub use icao_to_trace::*;
pub use legs::*;
pub use model::*;
pub use owners::*;
pub use private_emissions::leg_co2_kg;
pub use private_emissions::*;

/// A position of an aircraft
#[derive(Debug, Clone, PartialEq, serde::Serialize, serde::Deserialize)]
Expand Down
8 changes: 7 additions & 1 deletion src/private_emissions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,11 @@ pub fn leg_co2_kg(consumption: f64, duration: time::Duration) -> f64 {
* EMISSIONS_PER_KG
* RADIATIVE_INDEX
* LIFE_CYCLE_FACTOR
* OCCUPANCY_FACTOR
}

/// Returns the total CO2 emissions per person in kg of a private jet with a given
/// consumption (in GPH) of Jet-A fuel flying for a given amount of time,
/// as specified in [methodology `M-7`](../methodology.md).
pub fn leg_co2_kg_per_person(emissions: f64) -> f64 {
emissions * OCCUPANCY_FACTOR
}

0 comments on commit 2dfb2bc

Please sign in to comment.