General Disclaimer:   (HV) (DC) injury or death hazard,   use at your own risk,   may void warranty.

Difference between revisions of "Template:Mpge"

From My wiki
Jump to navigation Jump to search
(Initial Template, still need to build conversion code.)
 
(removed spaces from output which must be condensed when finished.)
Line 1: Line 1:
<includeonly>
+
<includeonly>''XX mpge''<!--
''XX mpge''
+
 
<!-- This is the Template:Mpg code, will need more complexity for mpge calculations:
+
This is the Template:Mpg code, will need more complexity for mpge calculations:
 
Catch each fuel type and convert to kWh equivalent, or zero that fuels value.
 
Catch each fuel type and convert to kWh equivalent, or zero that fuels value.
 
Catch km and convert into miles.
 
Catch km and convert into miles.

Revision as of 12:14, 15 January 2008


Template to convert fuel mileage from various fuels or combinations of fuels into MPGe Miles per Gallon of Gasoline Equivalent.

  • {{mpge|miles=50.00|kWh=10.00}} results in XX mpge
  • {{mpge|km=80.00|kWh=10.00}} results in XX mpge
  • {{mpge|miles=50.00|kWh=10.00|metric=on}} results in XX mpge
  • {{mpge|miles=50.00|kWh=10.00|imperial=on}} results in XX mpge
  • {{mpge|miles=50.00|gas=1.000}} results in XX mpge
  • {{mpge|miles=50.00|diesel=1.000|lk=on}} results in XX mpge
  • {{mpge|L100km=50}} results in XX mpge
  • {{mpge|mpg=50}} results in XX mpge

Options:

See also:


Amount of fuel = 1 gallon of gasoline (measured in units for fuel type)
Gasoline (regular unleaded) 1 Gallon = 114,100 BTUs
Diesel .88 Gallons
Liquid Natural Gas 126.67 Cubic Feet
Compressed Natural Gas 33.56 Kilowatt hours
Liquefied Petroleum Gas 1.35 Gallons
Methanol 2.01 Gallons
Ethanol 100% 1.500 Gallons
Ethanol 85% 1.425 Gallons
Ethanol 10% 1.050 Gallons
Electricity 33.56 Kilowatt hours