Template talk:Unit of length

From Wikipedia, the free encyclopedia

Templates for deletion This template was considered for deletion on 2007 August 27. The result of the discussion was Keep.

Contents

[edit] Suggestions

I've created this infobox. Because this is essentially a prototype, I've only created one for units of length and no other units, and I've only put it in one article (inch). Any discussion, feedback, editing, etc. is welcome. Hopefully we can get it to a point where we can use it in more articles and base more templates off of it.

So, uh, any suggestions? -Branddobbe 07:30, 18 October 2005 (UTC)

There is no reason to have all of these units necessary to use the template. For example, the metre does not need long xor inaccurate equivalences to the light-year and the parsec. —Centrxtalk • 04:21, 30 July 2006 (UTC)

[edit] Needs to be more picky and/or flexible

Please remove the smoot from this template. (I'm not going to edit it myself because I don't understand the syntax and it's very dense!) At a slightly lower priority, please also remove fathom. Neither of these units is at all useful. I think that it's also debatable whether so many different metric units that only differ by their exponent are useful.
And at least from the point of view of the article I came here through, Bohr radius, most of the others are pretty silly too. No one cares how many nautical miles the Bohr radius is. I think that for this template to be useful, it has to be configurable so that it only shows conversions that are reasonable for what is under discussion. Until then, I'm going to remove it from the Bohr radius page at least.
--Strait 14:46, 1 August 2006 (UTC)
It also occurs to me that the smoot is not a US customary unit, so were there to be a call for it to be kept, it should be in its own section. (However, I don't think it should be retained at all.) --Strait 17:28, 1 August 2006 (UTC)


[edit] Conversion error

Conversion to miles seems to be (very) broken. As it is, it states that 1 metre is about half a mile, and a mile is about a thousand miles (sic). Alas, I'm new and have no idea how to fix it... TeraBlight 09:35, 12 August 2006 (UTC)

Yes, User:SimonLyall meant to remove smoots, but instead removed the miles. The units are found after the calculations. Hopefully everything is better now.--Coolhandscot 05:14, 15 August 2006 (UTC)
It isn't. It still says that 1 metre is 621.3...*10^-6 miles, which isn't proper scientific notation.--Kooky (talk) 04:13, 7 September 2006 (UTC)
That seems to be intentional, it's supposed to be Engineering notation. TeraBlight 11:20, 7 September 2006 (UTC)
Ah, of course! Forgive my imprudence. I am taking a chemistry course and an astronomy course and I have scientific notation on the brain. :) --Kooky (talk) 19:32, 7 September 2006 (UTC)

[edit] Why US customary units?

When they are also British customary / Imperial units. GraemeLeggett 09:40, 16 August 2006 (UTC)

Because the British are smart enough not to use them for everything anymore. Quantumobserver (talk) 20:28, 8 June 2008 (UTC)

[edit] Thin space

This is an excellent template, but the thinspaces ( ) appear as boxes in my browser (IE6) (and I have not choice about that). I changed the thin spaces to something that should not be problematic ( ) but was reverted. Fine, so my browser is "incompatible", but I suspect many other readers will have the same problem. Surely we should try not to use characters that many readers will not be able to view? -- ALoan (Talk) 10:42, 15 February 2007 (UTC)

[edit] Deprecate?

Would it make sense to deprecate this template in favor of {{conv-dist}}, which seems to cover more contingencies?—Ëzhiki (Igels Hérissonovich Ïzhakoff-Amursky) • (yo?); 18:52, 7 March 2007 (UTC)

Seeing as one is for in-line conversions whilst the other is an infobox, I would say that it wouldn't make sense. Jɪmp 08:04, 29 August 2007 (UTC)

[edit] Slight name change to Infobox unit of length

Does anyone have a problem with changing the name to Infobox unit of length to properly reflect that this is an infobox and not an inline conversion template like {{ft to m}}? If no one objects, I'll make the switch soon. —MJCdetroit 18:17, 24 July 2007 (UTC)

Good idea, reduces confusion. PamD 07:24, 29 August 2007 (UTC)

Do it. Quantumobserver (talk) 20:29, 8 June 2008 (UTC)

[edit] How many ångströms in a parsec? How many light-years in a Bohr radius?

It would seem that the likely outcome of the current deletion discussion for this template will be that it needs fixing. The inclusion of inches and millimetres in the template as it appears on such articles as Parsec & Light-year is absurd but makes perfect sense on Centimetre. It's similarly ridiculous to include light-years and astronomical units on Inch and Millimetre but they're fine on Parsec. How many light-years in a Bohr radius? Who gives a toss? But; how many Planck lengths? Now we're talking. The template needs an overhaul so that only relevant conversions are displayed. Jɪmp 03:57, 29 August 2007 (UTC)

I've made some adjustments:
The adjustements noted in the following list have been superceded.
  • m & km will only display for lengths greater than 30 μm
  • AU & ly will only display for lengths greater than 30 km
  • mm & Å will only display for lengths less than 30 mm
  • in & ft will only display for lengths less than 5 km
  • yd & mi will only display for lengths greater than 5 mm
It's not perfect but it's a start. I hope to fix the template up further. Some of what I've got in mind is:
  • ditching ångströms in favour of micrometres & nanometres
  • including Planck lengths for subatomic length units (e.g. Bohr radius)
  • including parsecs for astronomical units
  • allowing more flexibility with respect to what units are displayed (currently they are paired up, e.g. m & km, so you've either got neither or both), feet, for example, should be converted to metres and millimetres but not kilometres nor ångströms
  • allowing for nautical units to be converted to other nautical units
Jɪmp 08:00, 29 August 2007 (UTC)
Your current and proposed changes should be an improvement.
  • Non-SI: I cannot speak for the non-SI measurements because I don't understand them all.
  • SI: The logical nature of SI is such that showing mm and km values is of trivial value over the metre value. This is because the 1000 down, 1000 up relationship and the milli and kilo prefixes are so widely understood. I can accept that less widely understood prefixes such as micro and nano may be more than trivial value.
Curiously, the mega, giga and tera prefixes are not used much for length. If they were, I think that only the tera prefix and upwards would have much benefit. Perhaps this is because computers have made people familiar with mega and giga. That is not a suggestion for the template, merely an expressed thought.
I still think the template is silly but these changes are reducing the silliness. Lightmouse 10:36, 29 August 2007 (UTC)
I aim to eliminate it ... but we've got a fair way yet to go. I agree that we don't need this plethora of metric conversions one or two should be plenty. Jɪmp 08:55, 30 August 2007 (UTC)
I've made some of those changes I'd mentioned. Now only two metric conversions and two imp/US ones are shown, this is enough. There's still work to be done though. Jɪmp 17:45, 30 August 2007 (UTC)
So I see. You have reduced its silliness significantly. Thanks for what you have done. I appreciate it. Lightmouse 17:58, 30 August 2007 (UTC)
Thank you for pointing it out in the first place. I have completed all of the adjustments mentioned above except for allowing for nautical units to be converted to other nautical units.
I've managed to dig up three such units (any fewer and the idea of having a special section for them would hardly make sense); the nautical mile, the fathom and the cable; however; there just doesn't seem to be enough agreement on what the latter two really mean (according to what's written on the articles). Therefore I really don't think it's worthwhile giving special consideration to these units.
Another change that I've made is to eliminate conversions from a unit to itself, e.g. the metre is converted to 1000 mm and 100 cm not 1 m and the foot is converted to 12 in and 0.3333 yd not 1 ft. This works on the unit name so if some other unit just happens to be equal to a metre, foot, millimetre, mile, etc. but is called by another name it'll be converted as usual to 1 m, 1 ft, 1 mm, 1 mi, etc. (afraid this doesn't ignore different spellings for the same word ... this could easily be done but all articles on the units in question use Commonwealth spelling so it doesn't seem necessary).
Jɪmp 01:24, 4 September 2007 (UTC)
Eliminating self conversion (e.g. 1 m -> 1 m) is a good thing. Working on the unit name is good engineering. Thanks.
I did not know about issues with the fathom, I thought all references to it translated exactly as 6 feet but I see it is more complicated than that. Conversions are not as simple as they seem. I suppose it reinforces the adage "everything you think you know is wrong". Lightmouse 09:34, 4 September 2007 (UTC)
Yeah, I'd been thinking that it would be a straight-forward matter to give nautical miles in cables & fathoms, cables in fathoms and nautical miles, etc. But it doesn't seem possible. Jɪmp 16:29, 9 September 2007 (UTC)

[edit] Ångstrom vs nanometre

re ångströms: Plenty of astronomers definitely still use this measurement (rather than nanometers) so that I don't know that eliminating it is necessarily the correct answer. Dfmclean 19:14, 4 September 2007 (UTC)
I read also that the rod is popular amongst canoeists and that horse racers measure the length of the track in furlongs and the height of their beasts in hands. Though I'm going to stick my neck out and suggest that there is no "correct answer".
Their differing by only a factor of ten, I don't believe that we need both ångströms and nanometres. So, which do we choose? Plenty of astronomers may indeed use the former but I'm sure very few if any of them would be unfamiliar with the latter.
Astronomers aside, though, which unit would be better known by the general public? Actually, I don't know ... but I'm guessing it's the nanometre. For what it's worth, a quick Google gives the following
  • 5,440,000 for nanometre OR nanometer
  • 2,560,000 for ångström OR angstrom
Of course, not all of these hits are for the units but a casual skim indicates a greater proportion of the former than the latter are.
The nanomete's nice also in that it fits in with the pattern of thousands (i.e. kilo = 1000, milli = 1000^(-1), micro = 1000^(-2), etc. and the use of engineering notation) ... yes, I know, I did introduce the centimetre into the template but I reckon I had valid reasons (and would be happy to give them).
On top of that we have the following from our own Ångstrom article.
Today, the use of the Ångstrom as a unit is less popular than it used to be and the nanometre (nm) is often used instead (with the Ångstrom being officially discouraged by both the International Committee for Weights and Measures and the American National Standard for Metric Practice).
Anyhow, I'm not saying my ditching of ångströms in favour of nanometres was right, I'm just attempting to explain my reasoning for doing so.
Jɪmp 16:29, 9 September 2007 (UTC)

[edit] Significant change in "accuracy"

The parameter, {{{accuracy}}}, used to determine the number of figures after the decimal point (in the conversions given). This meant that the number of significant figures in the conversion could vary widely, e.g. accuracy=3 would entail a range of significant figures from four to six. I've reassigned this parameter such that it specifies the number of significant figures directly. This gives more overall consistancy in the precision of the conversions given. To counterbalance this change I've bumped the default up to 5. Jɪmp 08:48, 30 August 2007 (UTC)

That is interesting. I have been trying to address a similar problem of precision with the 'convert' template. Look at Template_talk:Convert#Request_for_an_option_to_match_input_and_output_significant_figures. You will see the importance of this when you see the difficulty I have using precision for square feet in my monobook code. I would be grateful if you could help. Lightmouse 18:02, 30 August 2007 (UTC)

[edit] Violation of Manual of Style (dates and numbers)

This template violates MOS:NUM which states:

Large numbers
  • Commas are used to break the sequence every three places left of the decimal point; a space is never used in this role (2,900,000, not 2 900 000).

I suppose some people might disagree with this; if they do, they should get the "Manual of Style (dates and numbers)" changed. --Gerry Ashton 19:10, 13 October 2007 (UTC)

It's been fixed. Jɪmp 07:53, 27 November 2007 (UTC)

[edit] Error in usage on "inch" page

Here is how the infobox shows up on the inch page (emphasis added):

1 inch = SI units 25.40×10−3 m 25.4 mm US customary / Imperial units 0.0278 yd 0.0833 in

I have no familiarity with parser functions, so I'm not even going to look at the code and try to fix it myself. ~ MD Otley (talk) 02:53, 16 December 2007 (UTC)

Fixed. Jɪmp 01:29, 20 February 2008 (UTC)

[edit] Deletion of subtemplates

The following are up for speedy deletion since they aren't used. They might be needed in future so here's the code.

Template:Unit of length/BigsmalllP (edit|talk|history|links|watch|logs)

|-
!colspan="2"| [[Natural units]]
|-
|{{#expr:11.70623762round({{{a}}}-2)}} [[Stoney units|''l''<sub>S</sub>]]
|{{Template:Unit of length/enginote|m={{{m}}}|a={{{a}}}|f=0.00000000005291772108}} [[Bohr radius|''a''<sub>0</sub>]]

Template:Unit of length/SI3 (edit|talk|history|links|watch|logs)

|-
!colspan="2"| [[International System of Units|SI units]]
|-
|{{Template:Unit of length/enginote|m={{{m}}}|a={{{a}}}}} [[metre|m]]}}
|{{Template:Unit of length/enginote|m={{{m|1}}}|a={{{a}}}|f=0.000001}} [[micrometre|μm]]

Jɪmp 01:21, 20 February 2008 (UTC)

They're used now. Jɪmp 07:25, 20 February 2008 (UTC)