Template talk:Convert/Archive February 2012

From WikiProjectMed
Jump to navigation Jump to search

Ranges with dashes and negative amounts

Because negative numbers are rare in range conversions with a dash "–" the spaces around the dash have not been displayed by Convert. In fact, any extra spaces inserted around a dash are trimmed away by Convert. However, {{Convert/2}} can be used to force the spaces around a dash (" – ") by using a literal " – " as follows:

  • {{convert |4|-|6|ft|m}} → 4–6 feet (1.2–1.8 m)
  • {{convert |4|-|-6|ft|m}} → 4 – −6 feet (1.2 – −1.8 m)
  • {{convert |4| – |-6|ft|m}} → 4 – −6 feet (1.2 – −1.8 m)
  • {{convert/2 |4| – |-6|ft|m}} → {{convert/2|4| – |-6|ft|m}}

When the use of negative numbers has been so rare, then using Convert/2 is a good alternative.

Meanwhile, to fix typical dash-ranges for negative amounts, I have tested new sandbox versions, using unit-code "-/sandbox" to show how the subtemplates could be changed to space around the dash. The 2 subtemplates which need to be updated are: Template:Convert/-/AoffSoff & Template:Convert/-/AonSoff. Compare the results:

  • {{convert |4|-|6|ft|m}} → 4–6 feet (1.2–1.8 m)
  • {{convert |4|-|-6|ft|m}} → 4 – −6 feet (1.2 – −1.8 m)
  • {{convert|4+1/2|-/sandbox|5+7/8|ft|m}} → 4+12 -/sandbox[convert: unknown unit]
  • {{convert|4+1/2|-/sandbox|-5-7/8|ft|m}} → 4+12 -/sandbox[convert: unknown unit]

The updated versions will even space before a negative fraction.

The sandbox versions for "-/sandbox" have embedded the "/sandbox" in the middle of the name of each subtemplate, rather than at the end of the name. To install the new sandbox versions:

Those sandbox versions also contain new doc-text explanations to describe the operation of each of those subtemplates. Each of those 2 has also been rewritten to simplify checking for fractions in each amount. -Wikid77 12:56, 16 January 2012 (UTC)

Done. Thanks. JIMp talk·cont 00:18, 1 February 2012 (UTC)

Request - periods and frequencies

eg rpm, rphr, Hz; also via the reciprocal time unit eg year, day, hour, minute, second; possibly also "degrees per sec"

eg a period of 1 year = 31 536 000 sec = 3.1709792 × 10-8 Hz - useful for both astronomy (motion of planets), and mechanics (motor engines), and probably other things - Mddkpp (talk) 07:28, 8 February 2012 (UTC)

Formating of range of 2 values

There is a inconsistency in the way {{convert}} and {{convert/2}} output the converted values for a range of two values.

{{convert|1|x|2|m|ft}}

Gives: 1 by 2 metres (3.3 ft × 6.6 ft) (with spaces each side of the multiply sign)

{{convert/2|1|x|2|m|ft}}

Gives: {{convert/2|1|x|2|m|ft}} (without spaces each side of the multiply sign)

The same inconsistency exists with {{convert/3}} and {{convert/4}}. It would be nice if the outputs from these four templates could treat the multiplier sign the same.--DavidCane (talk) 21:23, 8 February 2012 (UTC)

  • To get both as "x" in Convert, then use "xx". For extra spaces in Convert/2, then use the small 'x' sign with spaces (" × ") directly:
  • {convert |1|xx|2|m|ft }} → 1 × 2 metres (3.3 × 6.6 ft)
  • {convert/2|1|x|2|m|ft}} → {{convert/2|1| x |2|m|ft}}
  • {convert/2|1| x |2|m|ft}} → {{convert/2|1| x |2|m|ft}}
  • {convert/2|1| × |2|m|ft}} → {{convert/2|1| × |2|m|ft}}
Unfortunately, there are numerous inconsistencies, in many places with Convert, just like in discussions when people spell "email" or "e-mail" or "Email". It is better to think of the differences as special options, rather than errors, but learn how to alter the results. For Convert/2, add the spaces around a small "×" or other symbols, but for Convert, use the separator "xx". -Wikid77 (talk) 20:58, 15 February 2012 (UTC)
This appears to be an undocumented feature as I can't find it in the usage description or examples of {{convert}} or any of the others.--DavidCane (talk) 00:38, 22 February 2012 (UTC)

Usefulness aside from conversion

Does this template do anything other than convert? That is, are there any hidden benefits like automatic categorization or useful metadata?

Peter Isotalo 19:53, 9 February 2012 (UTC)

Consistent formatting of units according to WP:MOS - eg 3 m2 (32 sq ft), especially for foot-pounds-force where most people forget the f at the end 8 N⋅m (5.9 lbf⋅ft)  Stepho  talk  21:55, 9 February 2012 (UTC)
This is information that has to be mentioned in the Convert/doc text. I'm adding a little something about it since right now it's a pure technical manual that doesn't explain how the template compares to simple plain text.
Peter Isotalo 10:27, 11 February 2012 (UTC)

Please refresh my memory

RESOLVED: Use "adj=1" to get "mile" if < 1. -Wikid77 21:05, 15 February 2012 (UTC)

For Big Butte Creek#Course, now does one get rid of the plural "s" in 0.6 miles (0.97 km) ? Peter Horn User talk 21:57, 10 February 2012 (UTC)

If you use 'sing=on' it removes the s but adds a hyphen, which seems the same as 'adj=on'. I thought it was correct to say '0.6 miles'? Frietjes (talk) 22:11, 10 February 2012 (UTC)
if you check Template:Convert/LoffAoffDbSoff you will see it checks to see if the unit is equal to 1, if so it uses the singular form, if not it uses the plural. Frietjes (talk) 22:20, 10 February 2012 (UTC)
Some where in the archives is buried 14 inch (6.4 mm) with a "disp=" that gets rid of the "s" without adding a hyphen. Peter Horn User talk 22:39, 10 February 2012 (UTC)
sure you could use 0.6 miles (0.97 km), but I'm not sure you want to if the "correct" form is to use the plural. Frietjes (talk) 22:48, 10 February 2012 (UTC)
I found in less than one, it is "adj=1". So 14 inch (6.4 mm)* & 0.6 miles (0.97 km)*, but the more complicated "disp=x| (|)" 14 inch (6.4 mm) works as well. Peter Horn User talk 23:07, 10 February 2012 (UTC)

Most articles lack conversions

Continued from Template talk:Convert/Archive August 2011#Most articles lack conversions. And where there are "hand conversions" they are quite often inaccurate. I have seen some "lulus". Peter Horn User talk 22:22, 10 February 2012 (UTC)

  • Thank you for noting that issue as well. Working with the WP:GOCE (Guild of Copy Editors), I have found that with thousands of articles containing so many spelling errors, grammar, and awkward phrases (often 50 per page), that most editors are too busy to add conversions, along with fixing the wording. At this point, I would think even reading the full WP:MOS Guideline would take most volunteers over a month of part-time hours. However, it is good to be aware of the widespread problems. -Wikid77 (talk) 20:41, 15 February 2012 (UTC)
E. g. I just finished adding conversions to Stairway#UK building regulations Peter Horn User talk 14:31, 16 February 2012 (UTC)
And then there are those users who actually dislike {{convert}}! See Template talk:Convert/Archive June 2010#Some wikipedians don't like conversion templates, User talk:Peter Horn/Archive 2#Templates and Template talk:Convert/Archive January 2011#Some editors do not like conversion templates. The use of the templates all but eliminate errors and therefore should be compulsory. At times the hand conversions leave much to be desired. Peter Horn User talk 12:28, 17 February 2012 (UTC)
For the record: in Marsh rice rat, User:Ucucha did not like (objected to) my introductions of {{convert}} and reverted them. See the Revision history of Marsh rice rat. Peter Horn User talk 14:06, 17 February 2012 (UTC) Peter Horn User talk 14:10, 17 February 2012 (UTC)
In Hunter Mountain Fire Tower#Tower construction and relocation I chanced on the following lulu hand conversion, namely 60-foot (36 m), which I changed to 60-foot (18.3 m). Case closed. Peter Horn User talk 15:27, 17 February 2012 (UTC)
None of what you're complaining about here actually requires adding any code into any wikitext. You could just as well subst the template and achieve the exact same level of correctness in terms of conversion.
Peter Isotalo 00:25, 22 February 2012 (UTC)

Another per-unit conversion required

For Stairway#UK building regulations 0.36 kN/m (2.1 lbf/in). Or should it be 0.36 kPa (0.052 psi)? Peter Horn User talk 14:27, 16 February 2012 (UTC)

looks like this one is done, and kN/m2 = kPa. Frietjes (talk) 22:24, 16 February 2012 (UTC)
  • DONE as paired subtemplates. Because the units are discussed in article "Stiffness" (and used in "Stairway"), then I created the paired subtemplates Template:Convert/kN/m and Template:Convert/lbf/in for kilonewtons/metre and pounds-force per inch. To help remember these types of units, I have called them "per-unit conversions". In this case, the kN/m unit was considered the base unit (created first), with whole factor b=1,000,000, and the lbf/in was set relative to kN/m by factor b=1,000,000/5.71014715. The testing of results was done with Google: "1.00 kN/m in lbf/in". However, those templates were "thrown together" in spare minutes, so perhaps expect to adjust them to handle special options. Thanks for requesting them, which will broaden our coverage to support similar per-unit conversions in the future. -Wikid77 23:11, 16 February 2012 (UTC)
Thanks. May be some day I'll learn to parse a conversion, but for now I'll contend myself to putting requests on the Template talk:Convert page. Peter Horn User talk 12:34, 17 February 2012 (UTC)
For Breckenridge Ski Resort, |snowfall = add 300 in/year (760 cm/year), 300 in/year (760 cm/year) or {{convert|300|in/a|cm/a|abbr=on}}. Peter Horn User talk 13:23, 17 February 2012 (UTC)
I created the first two. if you want redirects for in/a and cm/a we can always do that, but I'm not sure that is the standard abbreviation. it seems as though not abbreviating year is the standard on the orders of magnitude for speed page. Frietjes (talk) 17:27, 17 February 2012 (UTC)
these will work with other speed measurements as well, like 300 inches per year (5.4×10−7 mph). Frietjes (talk) 17:37, 17 February 2012 (UTC)

suppressing unit names not working for some units?

I wanted to have a table that shows acres/ha but since I would list the units in the table header, I wouldn't need to show them in the table itself. I'm using the abbr=values parameter, but it gives me a redlink to Template:Convert/LoffAvaluesDbSoffNa. Are not all units supported by the abbr=values parameter? What I'm trying to do is have, for example:

County Land in acres (ha)
Foo 100 (4)

But using the conversion template I get:

County Land in acres (ha)
Foo 100 (40)

Any ideas? --Esprqii (talk) 23:50, 17 February 2012 (UTC)

we were missing a redirect, it should work now, assuming that 100 acres = 40 hectares, and not 4 hectares. Frietjes (talk) 00:24, 18 February 2012 (UTC)
Beats me, that's why I used the template! Thanks for the fix! --Esprqii (talk) 06:59, 18 February 2012 (UTC)
Let's not to assume anything: 100 acres (40 ha) Peter Horn User talk 19:38, 19 February 2012 (UTC)

Get rid of more zeros

Ref: Template talk:Convert/Archive December 2011#Modification requested ot get rid of zeros. For Adirondack Mountains#State park, how to get rid of the zeros in 6,100,000 acres (2,500,000 ha). 6.1 e5acre[convert: unknown unit] did not work. Peter Horn User talk 19:46, 18 February 2012 (UTC)

Or should that be 61 e5acre[convert: unknown unit]? Peter Horn User talk 19:49, 18 February 2012 (UTC)
If I recall, we only have multiples of 3, but 6.1 million acres (2.5×10^6 ha) or 6.1 million acres (25,000 km2) would work. Thanks! Plastikspork ―Œ(talk) 22:28, 18 February 2012 (UTC)

Converting Mach numbers for laypersons

I would like to propose that the Convert template be enhanced to convert atmospheric flight speeds that are expressed in aerospace engineering Mach numbers into more standard units of speed.

I realize that Mach to velocity is non-linear, and is a function of atmospheric density and temperature (and probably whether the gas is "air" or some other gas like, say, the carbon-dioxide thin atmosphere prevalent on Mars). (So maybe we make it an "Mach-number-in-air" template only...)

My thesis is that Wikipedia is a general purpose encyclopedia for regular folk, and that any Mach number specified, outside of very near Mach 1 and the supersonic transition speed, simply obfuscates what is happening for the ordinary reader, especially once the Mach number is significantly different than Mach 1 +/- 30% or so.

For example, in a general purpose encyclopedia, when "Mach 3" (or "Mach 6" or "Mach 10" for first-stage rocket stage separation velocities) is used in an aerospace engineering-audience source, I believe it would be helpful to have something in Wikipedia that might look like:

...Mach 3 (approx. 1000 m/s) or ...Mach 3 (approx. 1 km/s)
or
...Mach 3 (850—1020 m/s, in Earth atmosphere)
or
something else that the convert template experts could help specify.

For the record, I did a search in the archives of this Talk page and found only two previous discussions of Mach number conversion: here (2006) and here (2011). Neither discussion really addressed the idea I have presented above.

Would love to see what others think? Could we perhaps come up with something that, while not perfect given the non-linearities inherent in Mach numbers, would be much better for the casual Wikipedia reader? Cheers. — N2e (talk) 15:04, 9 February 2012 (UTC)

Hey everyone, I would really appreciate a serious response to my question, above. Would it be possible to develop a mach number conversion that would allow the lay Wikipedia reader to attempt to have some idea of what sorts of speeds are implied by these esoteric numbers? N2e (talk) 20:57, 16 February 2012 (UTC)
  •  Done, as Template:Convert/Mach, where {{convert|2|Mach}} → Mach 2 (2,500 km/h; 1,500 mph), and allows optional parameter 4 for altitude in feet (temperature is ignored, and there is no parameter for temperature). Thank you for explaining the issues of altitude and temperature, which had made the conversion seem too complex to handle (months ago). Also, sorry for the delay(s) in response. I got distracted last week in discussions for why the Wikipedia edit-interface should not be changed much, due to dangers of becoming unusable. Then, I find today that the Wikipedia edit-interface is very slow and has become almost unusable, but perhaps the hangups are just in my PC. Anyway, I would have tested the new template more, but the difficulty of using Wikipedia to edit is just so frustrating. If there are any major problems with the conversion results, then I think they can be resolved fairly easily. Again, my apologies for not replying sooner. For other conversion examples, see doc text at: Template:Convert/Mach. -Wikid77 (talk) 18:25, 26 February 2012 (UTC)
GREAT WORK Wikid77. I have taken a look, and used the basic template you created in a dozen or so aerospace pages. That should start to get us some feedback from other users, and aerospace geeks generally. I'll reserve any other Talk for the Mach template Talk page (Template talk:Convert/Mach). Thanks again! N2e (talk) 04:43, 27 February 2012 (UTC)

Adhesion forces (N/cm2 units are common)

Scientific articles that report on progress with biomemetic or bio-inspired resettable adhesives often provide figures of merit in units of Newtons per square centimeter (N/cm2). While the units match the SI units for pressure (force/unit area), the SI unit Pascal is not used in this field since the interesting number is the adhesive force, normalized for a unit area.

What would be the best way to get a conversion in the article space for N/cm2 into psi? Is there a method that could utilize the Convert template to do so? N2e (talk) 13:41, 23 February 2012 (UTC)

  • The conversions would be:
{{convert|9|psi|0}} → 9 pounds per square inch (62 kPa)
{{convert|9|N/cm2|psi}} → 9 newtons per square centimetre (13 psi)
Previously, the Template:Convert/kN/m was defined as a base unit, and the Template:Convert/N/m2 could be a similar base unit, with others defined relative to that, for "N/cm2". -Wikid77 (talk) 10:31, 24 February 2012 (UTC)
Let's stick to using the SI to determine the base unit. This will avoid confusion. There are seven SI base units the products of these is what gets b=1. Thus, yes, N/m2 would be the base unit (we've already made the pascal the base unit) here but N/m not kN/m should be the base for stiffness. I've adjusted {{convert/kN/m}} and {{convert/lbf/in}} accordingly. Are there any others? JIMp talk·cont 16:43, 24 February 2012 (UTC)
Thanks Wikid77. I have used the template you pointed me to now once, on a Talk page to mention a new record reported measurement for Gecko-inspired adhesion. When I get a little more time, I'll work those findings into the appropriate article-space pages. N2e (talk) 04:49, 27 February 2012 (UTC)

Extra significant digits?

There appears to be an inconsistency in the output of positive and negative temperature conversions. I assume that this is unintended? SChalice 02:45, 26 February 2012 (UTC)

{{convert|270|C|F}}
270 °C (518 °F)
{{convert|-270|C|F}}
−270 °C (−454.00 °F)
  • Rare problem: Thank you for noting the extra 2 digits for "-270". It is a rare situation, so it might take a while to correct. Note other conversions do not add the 2 digits:
  • {{convert|-270|C|F|0}} → −270 °C (−454 °F)
  • {{convert|-270|C|F}} → −270 °C (−454.00 °F)
  • {{convert|-230|C|F}} → −230 °C (−382.0 °F)
  • {{convert|-210|C|F}} → −210 °C (−346.0 °F)
  • {{convert|-195|C|F}} → −195 °C (−319.0 °F)
  • {{convert|-170|C|F}} → −170 °C (−274 °F)
  • {{convert|-171|C|F}} → −171 °C (−276 °F)
  • {{convert|-27|C|F}} → −27 °C (−17 °F)
Just put the rounding parameter as "|0" for now, and I think we can find a fix for it soon enough. -Wikid77 (talk) 04:37, 26 February 2012 (UTC)