Calculations for vehicle emissions
Methods
(inner) calculateElectricCO2gPerMile(skv_config) → {struct}
For Electrics and electric portion of phevs
Parameters:
Name | Type | Description |
---|---|---|
skv_config |
struct | tariff_co2_gpkwh, battery_range_miles, battery_total_capacity_kwh |
Returns:
- Type
- struct
(inner) checkRequiredKeys() → {struct}
Returns:
- Type
- struct
(inner) co2gPerMileFromBatteryEnergy(tariff_co2_gpkwh, kwh_per_mile) → {number}
calculate co2 g per mile emitted from combination of co2 from tariff and energy used from battery
Parameters:
Name | Type | Description |
---|---|---|
tariff_co2_gpkwh |
number | |
kwh_per_mile |
number |
Returns:
- Type
- number
(inner) energyConsumedPerMile(battery_total_capacity_kwh, battery_range_miles) → {number}
calculate kWh used per mile
Parameters:
Name | Type | Description |
---|---|---|
battery_total_capacity_kwh |
number | |
battery_range_miles |
number |
Returns:
- Type
- number
(inner) iceCO2gPerMileFromWCCO2gPerMile(wc_co2_g_per_mile, wc_mpg, mpg, battery_range) → {number}
Pass in Weighted Combined CO2 g per mile and remove the electric portion to just leave the ICE CO2 g per mile
Parameters:
Name | Type | Description |
---|---|---|
wc_co2_g_per_mile |
number | most likely co2_gpkm which is tailpipe figures converted to miles |
wc_mpg |
number | |
mpg |
number | |
battery_range |
number |
Returns:
- Type
- number
(inner) productionUplift(co2_g_per_mile) → {number}
************** CALCULATIONS **************** ******************************************* /
/** Production uplift to give an estimate for how much co2 is produced to create and transport the fuel
Parameters:
Name | Type | Description |
---|---|---|
co2_g_per_mile |
number |
Returns:
uplift in co2 grams per mile
- Type
- number
(inner) tailpipeCO2gPerMile(skv_config) → {number}
For regular petrol and diesel cars and PHEVs in CS mode
Parameters:
Name | Type | Description |
---|---|---|
skv_config |
struct |
Returns:
- Type
- number