Module: BrighterPlanet

Defined in:
lib/flight/carbon_model.rb,
lib/flight.rb,
lib/flight/data.rb,
lib/flight/fallback.rb,
lib/flight/relationships.rb,
lib/flight/summarization.rb,
lib/flight/characterization.rb,
lib/flight/carbon_model/fuel_use_equation.rb

Overview

Flight carbon model This model is used by [Brighter Planet](brighterplanet.com)‘s carbon emission [web service](carbon.brighterplanet.com) to estimate the **greenhouse gas emissions of passenger air travel**.

Timeframe and date The model estimates the emissions that occur during a particular ‘timeframe`. To do this it needs to know the `date` on which the flight occurred. For example, if the `timeframe` is January 2010, a flight that occurred on January 5, 2010 will have emissions but a flight that occurred on February 1, 2010 will not.

Calculations The final estimate is the result of the calculations detailed below. These calculations are performed in reverse order, starting with the last calculation listed and finishing with the ‘emission` calculation. Each calculation is named according to the value it returns.

Methods To accomodate varying client input, each calculation may have one or more methods. These are listed under each calculation in order from most to least preferred. Each method is named according to the values it requires. If any of these values is not available the method will be ignored. If all the methods for a calculation are ignored, the calculation will not return a value. “Default” methods do not require any values, and so a calculation with a default method will always return a value.

Standard compliance Each method lists any established calculation standards with which it complies. When compliance with a standard is requested, all methods that do not comply with that standard are ignored. This means that any values a particular method requires will have been calculated using a compliant method, because those are the only methods available. If any value did not have a compliant method in its calculation then it would be undefined, and the current method would have been ignored.

Collaboration Contributions to this carbon model are actively encouraged and warmly welcomed. This library includes a comprehensive test suite to ensure that your changes do not cause regressions. All changes should include test coverage for new functionality. Please see [sniff](github.com/brighterplanet/sniff#readme), our emitter testing framework, for more information.

Defined Under Namespace

Modules: Flight