| 
 General Disclaimer: (HV) (DC) injury or death hazard, use at your own risk, may void warranty.  | 
Difference between revisions of "Template:Mpge"
		
		
		
		
		
		
		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:
- Make units wikilinked by attaching 
|lk=on.- The manual of style suggests that you only link the first instance.
 
 
See also:
- Template:Mpg - For U.S. gallons version
 - Template:Mpg (Imperial) - For Imperial (UK) gallons version
 - Template:L100km
 - W:Template:Convert
 
| 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 |