calculations/emissions

Emission related calculations

Source:
Since:
  • 0.0.3

Methods

(inner) getCo2ByAmountOfFuel(num_amount, from_unit, fuel_type) → {number}

Source:

co2 by a number of units of fuel

Parameters:
Name Type Description
num_amount number

Quantity of fuel

from_unit string

What unit the fuel quantity is in

fuel_type string

Type of fuel i.e diesel or petrol

Returns:

Total kg of CO2 for fuel supplied

Type
number

(inner) getCo2ByAmountOfMoney(num_amount, from_unit, fuel_type) → {number}

Source:

co2 by amount of money spent

Parameters:
Name Type Description
num_amount number

Quantity of fuel

from_unit string

What unit the fuel quantity is in

fuel_type string

Type of fuel i.e diesel or petrol

Returns:

Total kg of CO2 for fuel supplied

Type
number

(inner) getCo2ByDistance(num_distance, distance_unit, num_consumption, consumption_unit, fuel_type) → {number}

Source:

co2 by amount of fuel consumed

Parameters:
Name Type Description
num_distance number

Miles or KM travelled

distance_unit string

Miles or KM

num_consumption number

Quantity of fuel

consumption_unit string

l/100km or mpg

fuel_type string

Type of fuel i.e diesel or petrol

Returns:

Total kg of CO2

Type
number