Template talk:Convert/Archive April 2012

kBar→psi conversion seems to be incorrect
4 kBa provides an incorrect result. The template gives this result: 4 kBa. But the real result should be 4kBa = 58,000 psi. If I'm doing something wrong, please point it out, because I'd like to get this right. SkepticalRaptor (talk) 17:30, 5 April 2012 (UTC)
 * Unless I'm completely misunderstanding things, a barye is not a bar. According to the main page Barye 1 Ba is 10^-6 bar, so 4 kBa is 4 mbar.  Taking a bar as 15 psi, that is 15/250 = 3/50 = 0.06 psi which agrees with the template. Martin of Sheffield (talk) 17:42, 5 April 2012 (UTC)
 * Ok, thanks. I think I understand what I need to do.  Obviously, I never use Barye or bar, and I'm an idiot about it.  I appreciate your clarification.  SkepticalRaptor (talk) 05:23, 6 April 2012 (UTC)

convert metres to yards and feet
For the infoboxes of the Montreal Metro stations: 1281.69 m or even 1281.69 m instead of just 1281.69 m similar to |depth= 13 m. Peter Horn User talk 01:13, 2 April 2012 (UTC)
 * Is the use of centimetre precision appropriate to the context? Globbet (talk) 22:44, 4 April 2012 (UTC)
 * Appopriate or not, this is the way the interstation distances were given right from the start of the articles implicated including List of Montreal Metro stations. So let us leave well enough alone. Peter Horn User talk 18:01, 9 April 2012 (UTC)

Remove leading zero
Please add an option to remove the leading zero for values < 1. So that "1 mm" is "1 (.10)". --John S. Peterson (talk) 04:42, 6 April 2012 (UTC)
 * Currently, editors must hand-code conversions with special numeric formatting. For years, the Wikipedia Manual of Style, in WP:MOSNUM, has stated to keep the leading zero on decimal values less than one. For that reason, an intense debate might occur when removing the lead "0". -Wikid77 (talk) 11:07, 8 April 2012 (UTC)
 * Only Americans would favour the removal of the leading zero. If there are any pharmacists among the Wiki users they would be able to tell you that the lack of a leading zero and a weak decimal point on prescriptions has lead to deadly overdosages. At any rate, metric usage dictates the use of a leading zero. Peter Horn User talk 19:25, 9 April 2012 (UTC)

tonnes, long and short tons with abbr
When doing triple conversions with tonnes, abbr=on and abbr=in don't work as they should (abbr=out and abbr=off do, the former maybe only as it's the default). Abbr=in may just be a case of missing templates, but abbr=on is not abbreviating the input units.


 * 220 LT → 220 LT
 * 220 LT → 220 LT
 * 220 LT → 220 LT
 * 220 LT → 220 LT
 * 220 ST → 220 ST
 * 220 ST → 220 ST
 * 220 ST → 220 ST
 * 220 ST → 220 ST
 * 220 t → 220 t
 * 220 t → 220 t
 * 220 t → 220 t
 * 220 t → 220 t

Thryduulf (talk) 11:09, 6 April 2012 (UTC)
 * I fixed the redlinks, but I thought there was some reason that we never abbreviate LT and ST. I will try to look it up in the archives. Frietjes (talk) 19:42, 6 April 2012 (UTC)
 * I found this thread. Frietjes (talk) 19:48, 6 April 2012 (UTC)
 * Hmm, MOSNUM does say they should always be spelled out in full (given the previous discussion linked to I don't understand why, but that's another issue). However should be consistent - at the moment abbreviations are allowed when the input is long tons but not in other circumstances. Thryduulf (talk) 18:20, 7 April 2012 (UTC)
 * These subtemplates predate the MOSNUM rule. Most have been corrected to conform. J IM ptalk·cont 23:56, 8 April 2012 (UTC)

Kilometres per hour per second to miles per hour per second
For Montreal Metro: 5.2 km/h/s and/or 5.2 km/h/s instead of (5.2 km/h or 3.2 mph per second). Peter Horn User talk 18:06, 9 April 2012 (UTC)
 * Ditto for Montreal Metro and MR-63, 4.8 km/h/s instead of 4.8 km/h/s or 3.0 mph/s. Peter Horn User talk 19:16, 9 April 2012 (UTC)
 * According to MOSNUM "There should be no more than one slash per compound unit symbol (e.g., kg/(m·s), not kg/m/s or kg/m·s)." J IM ptalk·cont 00:46, 10 April 2012 (UTC)
 * So 4.8 km/h/s Peter Horn User talk 18:15, 10 April 2012 (UTC) Peter Horn User talk 18:19, 10 April 2012 (UTC)
 * The use of mph/s is a real bastardised unit of measure. How does the literature represent it using imperial units? and in metric units?  If the literature does not use both hours and seconds in metric units, then neither should we. Martinvl (talk) 10:14, 11 April 2012 (UTC)

new combination output request: ft mi
I could use a conversion from meters both to feet and to miles (for part of this edit, in which I dropped a miles part). I took a stab at User:JHunterJ/Convert/ft mi, but I don't know how to verify it. Help? -- JHunterJ (talk) 14:02, 10 April 2012 (UTC)
 * DONE. Those 2-unit outputs can only be tested as live templates, so I copied to Template:Convert/ft_mi. Your markup was close to working, but I had to copy similar 2-unit markup from Convert/km_mi to get the calculation to work. Then, tested by:
 * {&#123;convert|1609.344|m|ft mi}} &rarr; 1609.344 m
 * {&#123;convert|16,093.44|m|ft mi}} &rarr; 16,093.44 m
 * I suppose we need to expand Help:Convert to describe how to write a similar 2-unit output subtemplate for Convert's multi-conversions. -Wikid77 (talk) 09:32, 12 April 2012 (UTC)
 * Thanks! Worked like a charm. -- JHunterJ (talk) 11:44, 12 April 2012 (UTC)

Additional words in template output
How do I make the template output "328.54 competitive kilometres (204.15 miles)"? I tried doing 328.54 competitive and 328.54 km The first way broke the template, and the second way produced I tried doing 328.54 km but that resulted in extra km Any suggestions appreciated, thanks, Matthewedwards : Chat  22:32, 14 April 2012 (UTC)
 * 328.54 km
 * 328.54 km
 * DONE. Sorry for the late reply. Try adj=pre, as follows:
 * {&#123;convert|328.54|km|miles|adj=pre|competitive}} &rarr; 328.54 km
 * Other people asked for similar, so that is why we have that. -Wikid77 (talk) 09:38, 17 April 2012 (UTC)

convert/spell with ft and in
The template doesn't seem to work with input in feet and inches (needed for Goliath). Mostly this seems to be just one missing template (Template:Convert/LoffAcommaDoutput number onlySoff2), but specifying the output units and using the "words=out" parameter gives a big red error.


 * → 6 ft
 * → 6 ft
 * → 6 ft
 * → 6 ft
 * → 6 ft
 * → 6 ft
 * → 6 ft

Thryduulf (talk) 09:42, 15 April 2012 (UTC)

The same happens with stones and pounds, but that is missing template:Convert/multi2LoffAonSoffu2 when trying to get the second unit name. See user:Thryduulf/Conversion sandbox. 82.132.211.152 (talk) 10:05, 15 April 2012 (UTC)
 * PARTLY DONE. I have Convert/spell working for ft-in with some options, so far:
 * &rarr; 21 ft
 * The corrections have involved many very complex small changes, so I will fix other options later. -Wikid77 (talk) 16:26, 17 April 2012 (UTC)
 * Thank you. Although I note there is a discrepancy between the conversions between the numerical and word outputs (2.01m vs 2.00m). I'm guessing this will be a rounding error?
 * Separetly, I'm not sure "two point zero zero metres" is the best we can do, but that's a separate, sylistic issue. Thryduulf (talk) 18:28, 17 April 2012 (UTC)


 * ROUND RESULT BY |0. In Convert/spell, the option "|0" can be used to round the result to a whole amount:
 * &rarr; 6 ft
 * &rarr; 6 ft
 * I will check on the internal rounding of 2.01 versus 2.00. -Wikid77 21:39, 17 April 2012 (UTC)

grams/mile to grams/km
For some of the automobile articles we need to convert grams of per mile to grams per km and vice-versa. Is there a way to do this? There may or may not be a need to add ounces per mile to the mix.  Stepho  talk 08:11, 20 April 2012 (UTC)
 * Grams of per kilometre to ounces of  per mile is possible.  I'll add gCO2/mi. Codes: ,   and  . J IM ptalk·cont 08:30, 20 April 2012 (UTC)
 * Done. Feel free to change the gCO2/km default from ozCO2/mi to gCO2/mi if that makes more sense. (Go to convert/gCO2/km and edit the  to read  ). J IM ptalk·cont 08:42, 20 April 2012 (UTC)

overriding unit name on output (with multiple unit conversions)
In many space-related articles, sources give distances in nautical miles, and the articles reflect that; this has caused some confusion. An example is in Apollo 8. That spacecraft went past the moon and had a maximum distance in a number of nautical miles (203,752) that is substantially less than the number of statute miles (235,000 or so) that commonly cited as the distance to the moon. Yes, they're different units, but it does result in some head-scratching as someone looks at the figure and thinks "that can't be right."

The solution we have now is:


 * 203752 nmi

which generates:


 * 203,752 nautical miles (234,474 miles; 377,349 kilometers)

But the use of the unqualified "miles" after "nautical miles" is confusing. What we'd really like to see it produce is:


 * 203,752 nautical miles (234,474 statute miles; 377,349 kilometers)

Is there a way to do this? If not, can "statute miles" be added as a new unit, treated substantially the same as "miles" except for its output? (Note: see also Lightmouse's comment here.) TJRC (talk) 19:32, 25 April 2012 (UTC)


 * Adding statue miles as a new unit would be the easiest solution. J IM ptalk·cont 00:08, 26 April 2012 (UTC)


 * How about  for statute miles?
 * → "203752 nmi"
 * J IM ptalk·cont 02:38, 26 April 2012 (UTC)


 * I see what you did there... Thanks, you rock, it's now in use and looks much nicer. TJRC (talk) 05:28, 26 April 2012 (UTC)

Convert/spell with US gallons
For Canada's Wonderland 2000000 usgal instead of 2000000 usgal Or how was it that one shortens the 2,000,000 to 2 million? Peter Horn User talk 02:22, 19 April 2012 (UTC)
 * You could use  to get "2 e6USgal" if you're okay with "2" as opposed to "two". J IM ptalk·cont 03:23, 19 April 2012 (UTC)
 * I'm OK with that, but still, "convert/spell" would be an interesting alternative option. Peter Horn User talk 13:45, 19 April 2012 (UTC)
 * Yes, it would. J IM ptalk·cont 23:17, 19 April 2012 (UTC)


 * Changing Convert/spell to avoid "Acomma" subtemplates: When I expanded Template:Convert/spell to show words for the output amount, I did not realize the impact of "abbr=comma" to require so many new subtemplates to handle that option. I will change Convert/spell to use {formatnum:2,333|R} to remove commas, and thereby avoid the need for subtemplates named with "Acomma". -Wikid77 13:16, 22 April 2012 (UTC)
 * DONE - Convert/spell supports more units: With today's changes, now US gallons can be used in Convert/spell:
 * &bull; {&#123;convert/spell|2000000|usgal|m3|0}} &rarr; 2000000 usgal
 * &bull; {&#123;convert/spell|651|usgal|L}} &rarr; 651 usgal
 * It took me a while (months) to realize that "abbr=comma" had been complicating the use of various other types of units. -Wikid77 12:33, 27 April 2012 (UTC)

How to include mph
For Stairlift how to include miles per hour in 0.07 m/s 0.07 metres per second {0.16 miles per hour) and 0.15 m/s (0.34 miles per hour). Peter Horn User talk 00:53, 29 April 2012 (UTC)
 * For custom combinations, use disp=out: There are often rare mixtures of output units, so just combine the first output as "disp=out" and then use "disp=out" for the 2nd unit, followed by ")" to end. For example:
 * 0.15 metres per second ({&#123;convert|0.15|m/s|ft/min|2|disp=out}};{&#123;convert|0.15|m/s|mph|2|disp=out}}) &rarr; 0.15 metres per second (0.15 m/s; 0.15 m/s)
 * Be sure to put "(" and space after the semicolon "; " when formatting the 2 combined output units. The newer option "disp=out" shortens the markup, compared to the older option "disp=output only". Again, there is a lot of flexibility of the output format when using disp=out. -Wikid77 (talk) 03:44, 29 April 2012 (UTC)

Horsepower
For IC3 298 kW instead of 298 kW or 405 metric hp. I just keep on finding new ones. Peter Horn User talk 22:38, 26 April 2012 (UTC)
 * Also for IC4. Peter Horn User talk 01:34, 27 April 2012 (UTC)
 * Make that 298 kW instead. Peter Horn User talk 01:54, 27 April 2012 (UTC)
 * The template is using "PS" (output abbr & input code) for metric horsepower. It might not be ideal (since it's from the German "Pferdestärke" and since it's ambiguous with petasiemens) but at least it's recognised.    doesn't currently exist but I'm wondering whether we really need convert to metric horsepower. J IM ptalk·cont 03:37, 27 April 2012 (UTC)
 * It appears in those articles, but for now I'll go with PS and put (Metric horse power in brackets). Peter Horn User talk 23:48, 28 April 2012 (UTC)
 * Neither 298 kW nor 298 kW work. 298 kW nor 298 kW do not work either. Peter Horn User talk 14:06, 30 April 2012 (UTC)

Conversion problem
I'm having a problem when converting long tons to tonnes:


 * 225 LT
 * 249 LT
 * 250 LT
 * 251 LT
 * 255 LT

The conversion for 250 long tons is currently showing as (250 t).

Thanks Edgepedia (talk) 11:47, 30 April 2012 (UTC)

Ok, answer myself, this needs to be 250 LT; its a prescion problem. Edgepedia (talk) 11:52, 30 April 2012 (UTC)