... in conception
... and in reality

Different orders of magnitude in a range?

edit

I just came across the need to convert "between 500 million and 1 billion pounds." Is there an elegant way to do this, or am I stuck with "0.5 billion" or "1000 million"? See Hydrogen cyanide#Production and synthesis. ~ฅ(ↀωↀ=)neko-channyan 21:38, 17 June 2024 (UTC)Reply

The article currently has plain text: "between 500 million and 1 billion pounds (between 230,000 and 450,000 t)". Convert can't handle that kind of operation. You would have to muck around with:
  • {{convert|500|e6lb|t|disp=number}} → 230,000
  • {{convert|1|e9lb|t|disp=out}} → 450,000 t
Johnuniq (talk) 23:26, 17 June 2024 (UTC)Reply

Angular Units

edit

Why are there no conversions for units of angular measurement?

Degrees (deg), radians (rad), milliradians (mrad), mils (mil—which exist in NATO, Soviet, and Polish streck variants), gradians/gons (grad/gon), grade/slope (%), gradient (run for every 1 unit of rise), ratio (rise/run), turns (tr/pla), (compass) points/winds (pt/wind), arcminutes/minutes of arc/minutes of angle (arcmin/'/moa), arcseconds (arcsec/"), hour angles, binary radians/binary degrees (brad), quadrants, sextants, octants are just a few of the common ones that should be included, and there are several other historical and parochial units of angular measurement as well.

Hermes Thrice Great (talk) 05:38, 2 July 2024 (UTC)Reply

For the record, here are previous discussions. It's not clear to me what useful conversions would actually be needed.
Johnuniq (talk) 05:58, 2 July 2024 (UTC)Reply

Linear feature density

edit

At Transport in Switzerland#Railways I've found a need to convert 122 km/1000 km2 into imperial (probably something like miles per 100 or 1000 sqmi). Is this something convert can handled? In the article I've gone with separate conversions to come up with 76 mi per 390 sq mi which is not ideal. Thryduulf (talk) 16:58, 19 July 2024 (UTC)Reply

Best I can find is {{cvt|0.122|km/km2|mi/sqmi|3}} to display as 0.122 km/km2 (0.196 mi/sq mi)
In theory we should be able to use e3km2 and e3sqmi but these don't work.  Stepho  talk  17:22, 19 July 2024 (UTC)Reply
Similarly at List of prominent mountains of Switzerland#Distribution there is approximately 1.09 summits per 100 km2 that I've just left as I can't work out anything sensible (I don't think 0.0109/km2 (0.028/sq mi) is particularly useful). Thryduulf (talk) 17:36, 19 July 2024 (UTC)Reply
Found a really clumsy and dirty technique: {{cvt|122|mi|km0|abbr=values|disp=preunit|km/1000 km<sup>2</sup>|mile/1000 sq mile}} displays as 122 km/1000 km2 (196 mile/1000 sq mile)
This relies on km/km2 converting to mi/sqmi being the same ratio as mi to km - ie km/km2 is same as 1/km and 1/km -> 1/mi being the same ratio as mi -> km. Dirty, very dirty.
Sadly, this trick doesn't work for summits per area.  Stepho  talk  17:57, 19 July 2024 (UTC)Reply
If there were a heap of these, new units for "1000 km2" and "100 sqmi" and "100 km2" could be defined. I'm not sure how clean the result would be but it might be reasonable. Johnuniq (talk) 03:20, 20 July 2024 (UTC)Reply

Template-protected edit request on 8 August 2024

edit

Suggested change: It is somewhat common in radio frequency, radar, microwave, infrared, light wave electromagnetic radiation studies and applications to convert frequency values (expressed in Hertz) into wavelength values (expressed in meters). The frequency values will be in units of Hz, kHz, MHz, GHz, and so on. For a full list of the most common possibilities, see Hertz § SI multiples.

Applicable uses: Such functionality would be very helpful in multiple (hundreds or more) articles that discuss things like "operating frequency", "transmission frequency", and the like in many situations. But in Template:Convert, there is no such calculation.

Formulae: A great discussion of the mathematics involved can be found at the Everything RF site.

Syntax/Results: The result of the conversion template should be something like this for {{Convert|2700|MHz|m|abbr=on}}:

2700 MHz (0.111 m)

Alternatively, for {{Convert|0.099|m|MHz|abbr=on}} result should look like this:

0.099 m (3019 MHz)

Please let me know if there's anything more I can provide to help.

Thanks — TadgStirkland401 (TadgTalk) 19:57, 8 August 2024 (UTC)Reply

@TadgStirkland401:   Not done for now: please establish a consensus for this alteration before using the {{Edit template-protected}} template. The calculation is simple, it's   where:   is the wavelength in metres;   is the speed of light in metres per second; and   is the frequency in Hertz. But where has this been discussed? --Redrose64 🌹 (talk) 20:25, 8 August 2024 (UTC)Reply
@Redrose64, thank you for the quick response. But please let me explain, as no malice was intended. When I go to the View Source tab of the template, I'm informed it is protected, and rightfully so. I immediately see the following message (with my thoughts between the bullets):
What can I do?
  • This template has a documentation page – Template:Convert/doc – and a sandbox page – Template:Convert/sandbox – both may be freely edited.
    • Tadg: I didn't think this would effect the necessary change.
  • Discuss this page with others.
    • Tadg: The last bullet below seems to do both in one move.
  • For move-protected pages, see requested moves.
    • Tadg: My request has nothing to do with a "move" action.
  • Request that the page's protection level be reduced.
    • Tadg: I am not able to rationalize the change to the template myself, so unprotecting it did not meet the need.
  • Find out more about how to get started editing Wikipedia.
    • Tadg: I am well aware it is beyond my skill level, but I don't need to go the the Help:Introduction page on this one.
  • If you have noticed an error or have a suggestion for a simple, non-controversial change, you can submit an edit request by clicking the button below and following the instructions. An administrator or template editor may then make the change on your behalf. Please check the talk page first in case the issue is already being discussed.
    • Tadg: This seemed like the most rational choice that I was given. You admitted this change was simple, and it is completely non-controversial, so I moved to the last part of the bullet. I checked the Template talk:Convert page, and found no discussion remotely like what I intended. So, I clicked the request button and followed the Template:Edit template-protected instructions to the letter.
I tried hard not miss anything in the process. My edit request serves the purpose of the second bullet by opening the discussion. I am more than willing to wait for the ensuing discussion before any action is taken. I certainly did not intend to offend anyone. — TadgStirkland401 (TadgTalk) 22:50, 8 August 2024 (UTC)Reply
Wikipedia:Edit requests is explicit: Requests should be accompanied by a clear and specific description of the requested change, and consensus should be obtained before requesting changes that are likely to be controversial.
I said that the calculation is simple, I didn't say that the coding is simple. The {{convert}} template is a wrapper for Module:Convert, which itself is the front-end for a whole set of modules written in Lua, a programming language that I have difficulty with. These modules are complex and interdependent, it is essential that any change be thoroughly tested before being put live, as each change to a live module will put 1.2 million pages into the job queue for reparsing, and this can take several days. If an error is found after a change is put live, it might be the work of minutes to fix it, but then those 1.2 million pages will exhibit the error until they've all been through the job queue a second time, which can take several more days. This risk is why it's controversial. --Redrose64 🌹 (talk) 23:46, 8 August 2024 (UTC)Reply
Convert supports a large number of units (see full list). A discussion in March 2015 ended up adding Hz as a strange unit of length. These work:
  • {{convert|0.099|m|MHz|abbr=on}} → 0.099 m (3,000 MHz)
  • {{convert|0.099|m|MHz|0|abbr=on}} → 0.099 m (3,028 MHz)
  • {{convert|2700|MHz|m|abbr=on}} → 2,700 MHz (0.11 m)
Johnuniq (talk) 00:00, 9 August 2024 (UTC)Reply
@Johnuniq, that is perfect! Just tried it in my sandbox, and it works exactly as expected. Thank you SO MUCH. Since 2015 was a long time for it not to appear yet in the documentation, and /doc is not protected, should I take the initiative to update it accordingly? Or is that already on someone’s plate? — TadgStirkland401 (TadgTalk) 06:09, 9 August 2024 (UTC)Reply
Have a go if you like but the problem is that the documentation is already too long and many units are not listed there. Somewhere it says that, with a link to the full list of units. Johnuniq (talk) 08:15, 9 August 2024 (UTC)Reply