unit_measurements 5.6.1 → 5.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/unit_measurements/unit_groups/frequency.rb +1 -1
- data/lib/unit_measurements/unit_groups/length.rb +19 -1
- data/lib/unit_measurements/unit_groups/magnetic_induction.rb +1 -1
- data/lib/unit_measurements/unit_groups/plane_angle.rb +16 -8
- data/lib/unit_measurements/unit_groups/power.rb +31 -1
- data/lib/unit_measurements/unit_groups/pressure.rb +34 -3
- data/lib/unit_measurements/unit_groups/volume.rb +6 -1
- data/lib/unit_measurements/unit_groups/weight.rb +11 -0
- data/lib/unit_measurements/version.rb +1 -1
- data/units.md +141 -74
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9cd4663e023a6580016dca729bc82766fba463f589a262408404d23e3fe478ef
|
|
4
|
+
data.tar.gz: d594ce914384d88e0563c7623463d7fbb649bef97c13cf46f3f8832b837da641
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6c481080564acab8baf3e706e1c7bc28cab1c7631bff878413ba9154532df4aee4f63b8a7f784d27d5926ed00b367720dbeb5c372edc5a21b45261dbec94af67
|
|
7
|
+
data.tar.gz: 1eeb96b7dd64e071efecba74f4ef19791f447e17fad484809062dfc8fc043aaaec34e42f57ea97a50e53b2b514b806e0e0c025008ef1890395f1b9a4fbba2b3e
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
## [5.8.0](https://github.com/shivam091/unit_measurements/compare/v5.7.0...v5.8.0) - 2023-11-06
|
|
2
|
+
|
|
3
|
+
### What's new
|
|
4
|
+
|
|
5
|
+
- Added new units of `pressure`.
|
|
6
|
+
- Added new units of `power`.
|
|
7
|
+
|
|
8
|
+
----------
|
|
9
|
+
|
|
10
|
+
## [5.7.0](https://github.com/shivam091/unit_measurements/compare/v5.6.1...v5.7.0) - 2023-11-04
|
|
11
|
+
|
|
12
|
+
### What's new
|
|
13
|
+
|
|
14
|
+
- Added new units `λ`, `cd`, and `cd-ft` in `volume`.
|
|
15
|
+
- Added new units `tn`, `LT`, `hyl`, `cwt`, and `cwt (US)` in `weight`.
|
|
16
|
+
- Added new units `μ`, `cb`, `b.c.`, `S`, `ls`, `lmin`, `lh`, `ld`, `lw`, `lm`, `ly` in `length`.
|
|
17
|
+
- Added new units `tr`, `cyc`, `sign`, `octant`, `sextant`, and `quadrant` in `plane angle`.
|
|
18
|
+
|
|
19
|
+
### What's removed
|
|
20
|
+
|
|
21
|
+
- Removed wrong plural aliases from units of `frequency` and `magnetic induction`.
|
|
22
|
+
|
|
23
|
+
----------
|
|
24
|
+
|
|
1
25
|
## [5.6.1](https://github.com/shivam091/unit_measurements/compare/v5.6.0...v5.6.1) - 2023-11-03
|
|
2
26
|
|
|
3
27
|
### What's removed
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -328,7 +328,7 @@ UnitMeasurements::Length.new(17.625, "m").round
|
|
|
328
328
|
You can check supported mathematical functions along with their examples
|
|
329
329
|
[here](https://shivam091.github.io/unit_measurements/UnitMeasurements/Math.html).
|
|
330
330
|
|
|
331
|
-
###
|
|
331
|
+
### Numeric conversions
|
|
332
332
|
|
|
333
333
|
You can convert measurement quantity directly to other numeric types viz.
|
|
334
334
|
`Integer`, `BigDecimal`, `Rational`, `Complex`, and `Float`.
|
|
@@ -6,7 +6,7 @@ UnitMeasurements::Frequency = UnitMeasurements.build do
|
|
|
6
6
|
primitive "Hz"
|
|
7
7
|
|
|
8
8
|
system :metric do
|
|
9
|
-
si_unit "Hz", aliases: ["hertz"
|
|
9
|
+
si_unit "Hz", aliases: ["hertz"]
|
|
10
10
|
|
|
11
11
|
unit "deg/s", value: [Rational(1, 360), "Hz"], aliases: ["°/s", "degree per second", "degrees per second"]
|
|
12
12
|
unit "rad/s", value: [Rational(1, (2 * Math::PI)), "Hz"], aliases: ["radian per second", "radians per second"]
|
|
@@ -9,6 +9,9 @@ UnitMeasurements::Length = UnitMeasurements.build do
|
|
|
9
9
|
si_unit "m", aliases: ["meter", "metre", "meters", "metres"]
|
|
10
10
|
|
|
11
11
|
unit "Å", value: "1e-10 m", aliases: ["angstrom", "angstroms", "ångström"]
|
|
12
|
+
unit "μ", value: "1 μm", aliases: ["micron", "microns"]
|
|
13
|
+
|
|
14
|
+
unit "cb (M)", value: "185.2 m", aliases: ["CBL. (M)", "cable length (M)"]
|
|
12
15
|
end
|
|
13
16
|
|
|
14
17
|
system :imperial do
|
|
@@ -21,21 +24,36 @@ UnitMeasurements::Length = UnitMeasurements.build do
|
|
|
21
24
|
unit "ch", value: "22 yd", aliases: ["chain", "chains"]
|
|
22
25
|
unit "th", value: "1/1000 in", aliases: ["thou", "thousandth of an inch", "mil", "mils"]
|
|
23
26
|
unit "nl", value: "3 nmi", aliases: ["NL", "nleague", "nleagues", "nautical league", "nautical leagues"]
|
|
27
|
+
unit "rd", value: "16 1/2 ft", aliases: ["rod", "rods", "perch", "pole", "lug"]
|
|
28
|
+
unit "cb", value: "608 ft", aliases: ["CBL.", "cable length"]
|
|
24
29
|
|
|
25
30
|
unit "ftm", value: "6 ft", aliases: ["fathom", "fathoms"]
|
|
26
31
|
unit "fur", value: "220 yd", aliases: ["furlong", "furlongs"]
|
|
27
32
|
unit "nmi", value: "1852 m", aliases: ["NMI", "M", "NM", "nautical mile", "nautical miles"]
|
|
28
|
-
unit "rod", value: "16 1/2 ft", aliases: ["rods", "perch", "pole", "lug"]
|
|
29
33
|
unit "lnk", value: "33/50 ft", aliases: ["l", "li", "link", "links"]
|
|
30
34
|
unit "lea", value: "3 mi", aliases: ["league", "leagues"]
|
|
35
|
+
|
|
36
|
+
unit "b.c.", value: "1/3 in", aliases: ["bc", "barleycorn", "barleycorns"]
|
|
31
37
|
end
|
|
32
38
|
|
|
33
39
|
system :us_customary do
|
|
34
40
|
unit "sft", value: "1200/3937 m", aliases: ["sfoot", "sfeet", "survey-foot", "survey-feet"]
|
|
41
|
+
|
|
42
|
+
unit "cb (US)", value: "720 ft", aliases: ["CBL. (US)", "cable length (US)"]
|
|
35
43
|
end
|
|
36
44
|
|
|
37
45
|
system :astronomical do
|
|
46
|
+
unit "S", value: "1e+9 km", aliases: ["spat", "spats"]
|
|
47
|
+
|
|
38
48
|
unit "au", value: "149597870700 m", aliases: ["astronomical unit", "astronomical units"]
|
|
39
49
|
unit "pc", value: [Rational(648000, Math::PI), "au"], aliases: ["parsec", "parsecs"]
|
|
50
|
+
|
|
51
|
+
unit "ls", value: "299792458 m", aliases: ["light-second", "light-seconds"]
|
|
52
|
+
unit "lmin", value: "60 ls", aliases: ["light-minute", "light-minutes"]
|
|
53
|
+
unit "lh", value: "60 lmin", aliases: ["light-hour", "light-hours"]
|
|
54
|
+
unit "ld", value: "24 lh", aliases: ["light-day", "light-days"]
|
|
55
|
+
unit "lw", value: "7 ld", aliases: ["light-week", "light-weeks"]
|
|
56
|
+
unit "lm", value: "30 ld", aliases: ["light-month", "light-months"]
|
|
57
|
+
unit "ly", value: "365.25 ld", aliases: ["light-year", "light-years"]
|
|
40
58
|
end
|
|
41
59
|
end
|
|
@@ -8,15 +8,23 @@ UnitMeasurements::PlaneAngle = UnitMeasurements.build do
|
|
|
8
8
|
system :metric do
|
|
9
9
|
si_unit "rad", aliases: ["radian", "radians"]
|
|
10
10
|
|
|
11
|
-
unit "deg", value: [(Math::PI / 180), "rad"], aliases: ["°", "degree", "degrees"
|
|
12
|
-
unit "gon", value: [(Math::PI / 200), "rad"], aliases: ["ᵍ", "grad", "gradian", "gradians"]
|
|
13
|
-
unit "arcmin", value: [Rational(1, 60), "deg"], aliases: ["′", "amin", "arcminute", "arcminutes"]
|
|
14
|
-
unit "arcsec", value: [Rational(1, 60), "arcmin"], aliases: ["″", "asec", "arcsecond", "arcseconds"]
|
|
11
|
+
unit "deg", value: [(Math::PI / 180), "rad"], aliases: ["°", "degree", "degrees", "degree of arc", "degrees of arc", "arcdegree", "arcdegrees"]
|
|
12
|
+
unit "gon", value: [(Math::PI / 200), "rad"], aliases: ["ᵍ", "grad", "gradian", "gradians"]
|
|
13
|
+
unit "arcmin", value: [Rational(1, 60), "deg"], aliases: ["′", "amin", "arcminute", "arcminutes"]
|
|
14
|
+
unit "arcsec", value: [Rational(1, 60), "arcmin"], aliases: ["″", "asec", "arcsecond", "arcseconds"]
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
unit "
|
|
18
|
-
unit "mil", value: [Rational(1, 6400), "cir"], aliases: ["mils"] # ((2 * π) / 6400) rad
|
|
19
|
-
unit "rev", value: [1, "cir"], aliases: ["revolution", "revolutions"] # (2 * π) rad
|
|
17
|
+
unit "tr", value: [1, "cir"], aliases: ["turn", "turns"]
|
|
20
18
|
|
|
21
|
-
unit "
|
|
19
|
+
unit "cir", value: [360, "deg"], aliases: ["circle", "circles"]
|
|
20
|
+
unit "rev", value: [1, "cir"], aliases: ["revolution", "revolutions"]
|
|
21
|
+
unit "cyc", value: [1, "cir"], aliases: ["cycle", "cycles"]
|
|
22
|
+
unit "mil", value: [Rational(1, 6400), "cir"], aliases: ["mils"]
|
|
23
|
+
|
|
24
|
+
unit "brad", value: [(Math::PI / 128), "rad"], aliases: ["b°", "bdeg", "binary degree", "binary radian", "binary degrees", "binary radians"]
|
|
25
|
+
|
|
26
|
+
unit "sign", value: "30 deg", aliases: ["signs"]
|
|
27
|
+
unit "octant", value: "45 deg", aliases: ["octants"]
|
|
28
|
+
unit "sextant", value: "60 deg", aliases: ["sextants"]
|
|
29
|
+
unit "quadrant", value: "90 deg", aliases: ["quadrants"]
|
|
22
30
|
end
|
|
@@ -8,16 +8,46 @@ UnitMeasurements::Power = UnitMeasurements.build do
|
|
|
8
8
|
system :metric do
|
|
9
9
|
si_unit "W", aliases: ["watt", "watts"]
|
|
10
10
|
|
|
11
|
+
unit "p", value: "980.665 W", aliases: ["poncelet", "poncelets"]
|
|
12
|
+
|
|
11
13
|
unit "hp (M)", value: "735.49875 W", aliases: ["PS", "metric horsepower"]
|
|
14
|
+
|
|
15
|
+
unit "kgf⋅m", value: "9.80665 W", aliases: ["kgf*m", "kilogramme-force meter", "kilogram-force meter"]
|
|
16
|
+
|
|
17
|
+
unit "cal/s", value: "4.1868 W", aliases: ["calorie per second", "calories per second"]
|
|
18
|
+
unit "cal/min", value: "0.06978 W", aliases: ["calorie per minute", "calories per minute"]
|
|
19
|
+
unit "cal/h", value: "0.001163 W", aliases: ["calorie per hour", "calories per hour"]
|
|
20
|
+
|
|
21
|
+
unit "l·atm/s", value: "101.325 W", aliases: ["l*atm/s", "litre-atmosphere per second", "liter-atmosphere per second"]
|
|
22
|
+
unit "l·atm/min", value: "1.68875 W", aliases: ["l*atm/min", "litre-atmosphere per minute", "liter-atmosphere per minute"]
|
|
23
|
+
unit "l·atm/h", value: "0.028145833333333335 W", aliases: ["l*atm/h", "litre-atmosphere per hour", "liter-atmosphere per hour"]
|
|
24
|
+
|
|
25
|
+
unit "atm⋅cm³/s", value: "0.101325 W", aliases: ["atm*cm^3/s", "atmosphere-cubic centimetre per second", "atmosphere-cubic centimeter per second"]
|
|
26
|
+
unit "atm⋅cm³/min", value: "1.68875e-3 W", aliases: ["atm*cm^3/min", "atmosphere-cubic centimetre per minute", "atmosphere-cubic centimeter per minute"]
|
|
27
|
+
unit "atm⋅cm³/h", value: "2.814583333333333e-5 W", aliases: ["atm*cm^3/h", "atmosphere-cubic centimetre per hour", "atmosphere-cubic centimeter per hour"]
|
|
12
28
|
end
|
|
13
29
|
|
|
14
30
|
system :imperial do
|
|
15
31
|
unit "hp", value: "745.69987158227022 W", aliases: ["hp (I)", "horsepower"]
|
|
32
|
+
|
|
33
|
+
unit "ft⋅lbf/s", value: "1.3558179483314004 W", aliases: ["ft*lbf/s", "foot pound-force per second"]
|
|
34
|
+
unit "ft⋅lbf/min", value: "0.02259696580552334 W", aliases: ["ft*lbf/min", "foot pound-force per minute"]
|
|
35
|
+
unit "ft⋅lbf/h", value: "0.00037661609675872 W", aliases: ["ft*lbf/h", "foot pound-force per hour"]
|
|
36
|
+
|
|
37
|
+
unit "atm⋅ft³/s", value: "2.8692044809344e+3 W", aliases: ["atm*ft^3/s", "atmosphere-cubic foot per second"]
|
|
38
|
+
unit "atm⋅ft³/min", value: "47.82007468224 W", aliases: ["atm*ft^3/min", "atmosphere-cubic foot per minute"]
|
|
39
|
+
unit "atm⋅ft³/h", value: "0.79700124704 W", aliases: ["atm*ft^3/h", "atmosphere-cubic foot per hour"]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
system :us_customary do
|
|
43
|
+
unit "BTU/s", value: "1055.05585262 W", aliases: ["british thermal unit per second", "british thermal units per second"]
|
|
44
|
+
unit "BTU/min", value: "17.584264210333 W", aliases: ["british thermal unit per minute", "british thermal units per minute"]
|
|
45
|
+
unit "BTU/h", value: "0.29307107017222 W", aliases: ["british thermal unit per hour", "british thermal units per hour"]
|
|
16
46
|
end
|
|
17
47
|
|
|
18
48
|
system :centimetre_gram_second do
|
|
19
49
|
unit "erg/s", value: "1e-7 W", aliases: ["erg per second", "ergs per second"]
|
|
20
50
|
end
|
|
21
51
|
|
|
22
|
-
unit "
|
|
52
|
+
unit "lusec", value: "133.3224 μW", aliases: ["lusecs"]
|
|
23
53
|
end
|
|
@@ -9,6 +9,40 @@ UnitMeasurements::Pressure = UnitMeasurements.build do
|
|
|
9
9
|
si_unit "Pa", aliases: ["pascal", "pascals"]
|
|
10
10
|
|
|
11
11
|
unit "bar", value: "100 kPa", aliases: ["bars"]
|
|
12
|
+
unit "atm", value: "101325 Pa", aliases: ["atmosphere", "atmospheres"]
|
|
13
|
+
unit "Torr", value: "1/760 atm", aliases: ["torr"]
|
|
14
|
+
|
|
15
|
+
unit "μmHg", value: "0.133322387415 Pa", aliases: ["micrometer of mercury", "micrometers of mercury", "micrometre of mercury", "micrometres of mercury"]
|
|
16
|
+
unit "mmHg", value: "133.322387415 Pa", aliases: ["millimeter of mercury", "millimeters of mercury", "millimetre of mercury", "millimetres of mercury"]
|
|
17
|
+
unit "cmHg", value: "1333.22387415 Pa", aliases: ["centimeter of mercury", "centimeters of mercury", "centimetre of mercury", "centimetres of mercury"]
|
|
18
|
+
|
|
19
|
+
unit "mH₂O", value: "9.80665 kPa", aliases: ["mH2O", "meter of water", "meters of water", "metre of water", "metres of water"]
|
|
20
|
+
unit "dmH₂O", value: "980.665 Pa", aliases: ["dmH2O", "decimeter of water", "decimeters of water", "decimetre of water", "decimetres of water"]
|
|
21
|
+
unit "cmH₂O", value: "98.0665 Pa", aliases: ["cmH2O", "centimeter of water", "centimeters of water", "centimetre of water", "centimetres of water"]
|
|
22
|
+
unit "mmH₂O", value: "9.80665 Pa", aliases: ["mmH2O", "millimeter of water", "millimeters of water", "millimetre of water", "millimetres of water"]
|
|
23
|
+
|
|
24
|
+
unit "kgf/m²", value: "9.80665 Pa", aliases: ["kgf/m^2", "kilogram-force per square metre", "kilogramme-force per square metre"]
|
|
25
|
+
unit "kgf/mm²", value: "9.80665 MPa", aliases: ["kgf/mm^2", "kilogram-force per square millimetre", "kilogramme-force per square millimetre"]
|
|
26
|
+
unit "kgf/dm²", value: "980.665 Pa", aliases: ["kgf/dm^2", "kilogram-force per square decimetre", "kilogramme-force per square decimetre"]
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
system :imperial do
|
|
30
|
+
unit "psf", value: "47.880259 Pa", aliases: ["lb/ft²", "lb/ft^2", "pound per square foot", "pounds per square foot"]
|
|
31
|
+
unit "psi", value: "6.894757 kPa", aliases: ["lb/in²", "lb/in^2", "pound per square inch", "pounds per square inch"]
|
|
32
|
+
unit "ksi", value: "1000 psi", aliases: ["kip per square inch", "kilopound per square inch", "kilopounds per square inch"]
|
|
33
|
+
|
|
34
|
+
unit "LT/ft²", value: "1.0725178011595e+5 Pa", aliases: ["LT/ft^2", "long ton per square foot", "long tons per square foot"]
|
|
35
|
+
unit "pdl/ft²", value: "1.488164 Pa", aliases: ["pdl/ft^2", "poundal per square foot", "poundals per square foot"]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
system :us_customary do
|
|
39
|
+
unit "inHg", value: "3.386388640341 kPa", aliases: ["″Hg", "inch of mercury", "inches of mercury"]
|
|
40
|
+
unit "ftHg", value: "40.636663684092 kPa", aliases: ["′Hg", "foot of mercury", "feet of mercury"]
|
|
41
|
+
|
|
42
|
+
unit "ftH₂O", value: "2.98898 kPa", aliases: ["ftH2O", "foot of water", "feet of water"]
|
|
43
|
+
unit "inH₂O", value: "249.0889 Pa", aliases: ["inH2O", "Aq", "inAq", "inch of water", "inches of water", "inch of water gauge", "inches of water gauge", "inch of water column", "inches of water column"]
|
|
44
|
+
|
|
45
|
+
unit "tn/ft²", value: "9.5760518e+4 Pa", aliases: ["tn/ft^2", "ton per square foot", "tons per square foot", "short ton per square foot", "short tons per square foot"]
|
|
12
46
|
end
|
|
13
47
|
|
|
14
48
|
system :centimetre_gram_second do
|
|
@@ -22,7 +56,4 @@ UnitMeasurements::Pressure = UnitMeasurements.build do
|
|
|
22
56
|
system :gravitational_metric do
|
|
23
57
|
unit "at", value: "98066.5 Pa", aliases: ["technical atmosphere", "technical atmospheres"]
|
|
24
58
|
end
|
|
25
|
-
|
|
26
|
-
unit "atm", value: "101325 Pa", aliases: ["atmosphere", "atmospheres"]
|
|
27
|
-
unit "Torr", value: [Rational(1, 760), "atm"], aliases: ["torr"]
|
|
28
59
|
end
|
|
@@ -8,6 +8,7 @@ UnitMeasurements::Volume = UnitMeasurements.build do
|
|
|
8
8
|
system :metric do
|
|
9
9
|
si_unit "l", aliases: ["liter", "litre", "liters", "litres"]
|
|
10
10
|
|
|
11
|
+
unit "λ", value: "1e-9 m³", aliases: ["lambda", "lambdas"]
|
|
11
12
|
unit "m³", value: "1000 l", aliases: ["m^3", "cu m", "cubic meter", "cubic meters", "cubic metre", "cubic metres"]
|
|
12
13
|
|
|
13
14
|
unit "mm³", value: "1e-9 m³", aliases: ["mm^3", "cu mm", "cubic millimeter", "cubic millimeters", "cubic millimetre", "cubic millimetres"]
|
|
@@ -40,16 +41,20 @@ UnitMeasurements::Volume = UnitMeasurements.build do
|
|
|
40
41
|
unit "hhd", value: "2 bbl", aliases: ["hogshead", "hogsheads"]
|
|
41
42
|
unit "fls", value: "1/24 floz", aliases: ["fluid scruple", "fluid scruples"]
|
|
42
43
|
|
|
43
|
-
unit "dspn", value: "10 ml", aliases: ["dsp", "dessertspoon", "dessertspoons"]
|
|
44
|
+
unit "dspn", value: "10 ml", aliases: ["dsp", "dstspn", "dessertspoon", "dessertspoons"]
|
|
44
45
|
unit "tbsp", value: "3 tsp", aliases: ["tbs", "tablespoon", "tablespoons"]
|
|
45
46
|
unit "floz", value: "1/160 gal", aliases: ["fluid ounce", "fluid ounces"]
|
|
46
47
|
unit "fldr", value: "1/8 floz", aliases: ["fluid drachm", "fluid drachms"]
|
|
47
48
|
end
|
|
48
49
|
|
|
49
50
|
system :us_customary do
|
|
51
|
+
unit "cd", value: "128 ft³", aliases: ["cord", "cords"]
|
|
52
|
+
|
|
50
53
|
unit "bdft", value: "144 in³", aliases: ["bf", "fbm", "board-foot", "board-feet"]
|
|
51
54
|
|
|
52
55
|
unit "ac⋅ft", value: "43560 ft³", aliases: ["acre-foot", "acre-feet"]
|
|
53
56
|
unit "ac⋅in", value: "6272640 in³", aliases: ["acre-inch", "acre-inches"]
|
|
57
|
+
|
|
58
|
+
unit "cd-ft", value: "1/8 cd", aliases: ["cord-foot", "cord-feet"]
|
|
54
59
|
end
|
|
55
60
|
end
|
|
@@ -24,11 +24,22 @@ UnitMeasurements::Weight = UnitMeasurements.build do
|
|
|
24
24
|
unit "oz", value: "1/16 lb", aliases: ["ounce", "ounces"]
|
|
25
25
|
unit "dr", value: "1/16 oz", aliases: ["dram", "drams"]
|
|
26
26
|
unit "gr", value: "1/7000 lb", aliases: ["grain", "grains"]
|
|
27
|
+
unit "LT", value: "2240 lb", aliases: ["imperial ton", "displacement ton", "imperial tons", "displacement tons", "long ton", "long tons", "weight ton", "weight tons"]
|
|
27
28
|
|
|
28
29
|
unit "drt", value: "60 gr", aliases: ["troy dram", "troy drams"]
|
|
29
30
|
unit "ozt", value: "480 gr", aliases: ["troy ounce", "troy ounces"]
|
|
30
31
|
unit "lbt", value: "5760 gr", aliases: ["troy pound", "troy pounds"]
|
|
31
32
|
unit "dwt", value: "1/20 ozt", aliases: ["pwt", "pennyweight", "pennyweights"]
|
|
33
|
+
unit "cwt", value: "112 lb", aliases: ["hundredweight", "long hundredweight", "imperial hundredweight"]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
system :us_customary do
|
|
37
|
+
unit "tn", value: "2000 lb", aliases: ["ton", "tons", "short ton", "short tons"]
|
|
38
|
+
unit "cwt (US)", value: "100 lb", aliases: ["hundredweight (US)", "short hundredweight"]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
system :gravitational_metric do
|
|
42
|
+
unit "hyl", value: "9.80665 kg", aliases: ["mug", "metric slug", "metric slugs", "hyls"]
|
|
32
43
|
end
|
|
33
44
|
|
|
34
45
|
system :foot_pound_second do
|
data/units.md
CHANGED
|
@@ -7,8 +7,8 @@ check below list of bundled units before converting your measurements.
|
|
|
7
7
|
|
|
8
8
|
| Indicator | Definition |
|
|
9
9
|
|:--|:--|
|
|
10
|
-
| * |
|
|
11
|
-
| ** |
|
|
10
|
+
| * | Supports [decimal SI prefixes](README.md#decimal-si-prefixes) |
|
|
11
|
+
| ** | Supports [binary SI prefixes](README.md#binary-si-prefixes) in addition to [decimal SI prefixes](README.md#decimal-si-prefixes) |
|
|
12
12
|
| _emphasised typeface_ | Primitive unit of the unit group |
|
|
13
13
|
|
|
14
14
|
## 1. Length or distance
|
|
@@ -19,23 +19,36 @@ These units are defined in `UnitMeasurements::Length`.
|
|
|
19
19
|
|:--|:--|:--|
|
|
20
20
|
| _1_ | _m*_ | _meter, metre, meters, metres_ |
|
|
21
21
|
| 2 | Å | angstrom, angstroms, ångström |
|
|
22
|
-
| 3 |
|
|
23
|
-
| 4 |
|
|
24
|
-
| 5 |
|
|
25
|
-
| 6 |
|
|
26
|
-
| 7 |
|
|
27
|
-
| 8 |
|
|
28
|
-
| 9 |
|
|
29
|
-
| 10 |
|
|
30
|
-
| 11 |
|
|
31
|
-
| 12 |
|
|
32
|
-
| 13 |
|
|
33
|
-
| 14 |
|
|
34
|
-
| 15 |
|
|
35
|
-
| 16 |
|
|
36
|
-
| 17 |
|
|
37
|
-
| 18 |
|
|
38
|
-
| 19 |
|
|
22
|
+
| 3 | S | spat, spats |
|
|
23
|
+
| 4 | μ | micron, microns |
|
|
24
|
+
| 5 | h | hh, hand, hands |
|
|
25
|
+
| 6 | in | ", inch, inches |
|
|
26
|
+
| 7 | ft | ', foot, feet |
|
|
27
|
+
| 8 | yd | yard, yards |
|
|
28
|
+
| 9 | mi | mile, miles, statute mile, international mile, statute miles, international miles |
|
|
29
|
+
| 10 | ch | chain, chains |
|
|
30
|
+
| 11 | th | thou, thousandth of an inch, mil, mils |
|
|
31
|
+
| 12 | au | astronomical unit, astronomical units |
|
|
32
|
+
| 13 | pc | parsec, parsecs |
|
|
33
|
+
| 14 | nl | NL, nleague, nleagues, nautical league, nautical leagues |
|
|
34
|
+
| 15 | rd | rod, rods, perch, pole, lug |
|
|
35
|
+
| 16 | cb | CBL., cable length |
|
|
36
|
+
| 17 | ls | light-second, light-seconds |
|
|
37
|
+
| 18 | lh | light-hour, light-hours |
|
|
38
|
+
| 19 | ld | light-day, light-days |
|
|
39
|
+
| 20 | lw | light-week, light-weeks |
|
|
40
|
+
| 21 | lm | light-month, light-months |
|
|
41
|
+
| 22 | ly | light-year, light-years |
|
|
42
|
+
| 23 | ftm | fm, fathom, fathoms |
|
|
43
|
+
| 24 | fur | furlong, furlongs |
|
|
44
|
+
| 25 | nmi | NMI, M, NM, nautical mile, nautical miles |
|
|
45
|
+
| 26 | lnk | l, li, link, links |
|
|
46
|
+
| 27 | lea | league, leagues |
|
|
47
|
+
| 28 | sft | sfoot, sfeet, survey-foot, survey-feet |
|
|
48
|
+
| 29 | b.c. | bc, barleycorn, barleycorns |
|
|
49
|
+
| 30 | lmin | light-minute, light-minutes |
|
|
50
|
+
| 31 | cb (M) | CBL. (M), cable length (M) |
|
|
51
|
+
| 32 | cb (US) | CBL. (US), cable length (US) |
|
|
39
52
|
|
|
40
53
|
## 2. Weight or mass
|
|
41
54
|
|
|
@@ -55,11 +68,16 @@ These units are defined in `UnitMeasurements::Weight`.
|
|
|
55
68
|
| 10 | lb | lbs, lbm, pound-mass, pound, pounds, \# |
|
|
56
69
|
| 11 | oz | ounce, ounces |
|
|
57
70
|
| 12 | gr | grain, grains |
|
|
58
|
-
| 13 |
|
|
59
|
-
| 14 |
|
|
60
|
-
| 15 |
|
|
61
|
-
| 16 |
|
|
62
|
-
| 17 |
|
|
71
|
+
| 13 | tn | ton, tons, short ton, short tons |
|
|
72
|
+
| 14 | LT | imperial ton, displacement ton, imperial tons, displacement tons, long ton, long tons, weight ton, weight tons |
|
|
73
|
+
| 15 | dwt | pennyweight, pennyweights |
|
|
74
|
+
| 16 | ozt | troy ounce, troy ounces |
|
|
75
|
+
| 17 | lbt | troy pound, troy pounds |
|
|
76
|
+
| 18 | drt | troy dram, troy drams |
|
|
77
|
+
| 19 | hyl | mug, metric slug, metric slugs, hyls |
|
|
78
|
+
| 20 | cwt | hundredweight, long hundredweight, imperial hundredweight |
|
|
79
|
+
| 21 | slug | slugs |
|
|
80
|
+
| 22 | cwt (US) | hundredweight (US), short hundredweight |
|
|
63
81
|
|
|
64
82
|
## 3. Time or duration
|
|
65
83
|
|
|
@@ -151,37 +169,40 @@ These units are defined in `UnitMeasurements::Volume`.
|
|
|
151
169
|
| # | Name | Aliases |
|
|
152
170
|
|:--|:--|:--|
|
|
153
171
|
| 1 | l* | liter, litre, liters, litres |
|
|
154
|
-
|
|
|
155
|
-
|
|
|
156
|
-
| 4 |
|
|
157
|
-
| 5 |
|
|
158
|
-
| 6 |
|
|
159
|
-
| 7 |
|
|
160
|
-
| 8 |
|
|
161
|
-
| 9 |
|
|
162
|
-
| 10 |
|
|
163
|
-
| 11 |
|
|
164
|
-
| 12 |
|
|
165
|
-
| 13 |
|
|
166
|
-
| 14 |
|
|
167
|
-
| 15 |
|
|
168
|
-
| 16 |
|
|
169
|
-
| 17 |
|
|
170
|
-
| 18 |
|
|
171
|
-
| 19 |
|
|
172
|
-
| 20 |
|
|
173
|
-
| 21 |
|
|
174
|
-
| 22 |
|
|
175
|
-
| 23 |
|
|
176
|
-
| 24 |
|
|
177
|
-
| 25 |
|
|
178
|
-
| 26 |
|
|
179
|
-
| 27 |
|
|
180
|
-
| 28 |
|
|
181
|
-
| 29 |
|
|
182
|
-
| 30 |
|
|
183
|
-
| 31 |
|
|
184
|
-
| 32 |
|
|
172
|
+
| 2 | λ | lambda, lambdas |
|
|
173
|
+
| _3_ | _m³_ | _m^3, cu m, cubic meter, cubic meters, cubic metre, cubic metres_ |
|
|
174
|
+
| 4 | mm³ | mm^3, cu mm, cubic millimeter, cubic millimeters, cubic millimetre, cubic millimetres |
|
|
175
|
+
| 5 | cm³ | cm^3, cu cm, cubic centimeter, cubic centimeters, cubic centimetre, cubic centimetres |
|
|
176
|
+
| 6 | dm³ | dm^3, cu dm, cubic decimeter, cubic decimeters, cubic decimetre, cubic decimetres |
|
|
177
|
+
| 7 | km³ | km^3, cu km, cubic kilometer, cubic kilometers, cubic kilometre, cubic kilometres |
|
|
178
|
+
| 8 | in³ | in^3, cu in, cubic inch, cubic inches |
|
|
179
|
+
| 9 | ft³ | ft^3, cu ft, cubic foot, cubic feet |
|
|
180
|
+
| 10 | yd³ | yd^3, cu yd, cubic yard, cubic yards |
|
|
181
|
+
| 11 | mi³ | mi^3, cu mi, cubic mile, cubic miles |
|
|
182
|
+
| 12 | ftm³ | ftm^3, cu ftm, cubic fathom, cubic fathoms |
|
|
183
|
+
| 13 | c | cup, cups |
|
|
184
|
+
| 14 | qt | quart, quarts |
|
|
185
|
+
| 15 | gi | gill, gills |
|
|
186
|
+
| 16 | pt | pint, pints |
|
|
187
|
+
| 17 | pk | peck, pecks |
|
|
188
|
+
| 18 | gt | gtt, drop, drops |
|
|
189
|
+
| 19 | cd | cord, cords |
|
|
190
|
+
| 20 | gal | gallon, gallons |
|
|
191
|
+
| 21 | bbl | barrel, barrels |
|
|
192
|
+
| 22 | tsp | teaspoon, teaspoons |
|
|
193
|
+
| 23 | bsh | bu, bushel, bushels |
|
|
194
|
+
| 24 | min | minim, minims |
|
|
195
|
+
| 25 | bkt | bucket, buckets |
|
|
196
|
+
| 26 | hhd | hogshead, hogsheads |
|
|
197
|
+
| 27 | fls | fluid scruple, fluid scruples |
|
|
198
|
+
| 28 | dspn | dsp, dstspn, dessertspoon, dessertspoons |
|
|
199
|
+
| 29 | fldr | fluid drachm, fluid drachms |
|
|
200
|
+
| 30 | bdft | bf, fbm, board-foot, board-feet |
|
|
201
|
+
| 31 | tbsp | tbs, tablespoon, tablespoons |
|
|
202
|
+
| 32 | floz | fluid ounce, fluid ounces |
|
|
203
|
+
| 33 | ac⋅ft | acre-foot, acre-feet |
|
|
204
|
+
| 34 | ac⋅in | acre-inch, acre-inches |
|
|
205
|
+
| 35 | cd-ft | cord-foot, cord-feet |
|
|
185
206
|
|
|
186
207
|
## 10. Density
|
|
187
208
|
|
|
@@ -232,14 +253,20 @@ These units are defined in `UnitMeasurements::PlaneAngle`.
|
|
|
232
253
|
| # | Name | Aliases |
|
|
233
254
|
|:--|:--|:--|
|
|
234
255
|
| _1_ | _rad*_ | _radian, radians_ |
|
|
235
|
-
| 2 |
|
|
236
|
-
| 3 |
|
|
237
|
-
| 4 |
|
|
238
|
-
| 5 |
|
|
239
|
-
| 6 |
|
|
240
|
-
| 7 |
|
|
241
|
-
| 8 |
|
|
242
|
-
| 9 |
|
|
256
|
+
| 2 | tr | turn, turns |
|
|
257
|
+
| 3 | deg | °, degree, degrees, degree of arc, degrees of arc, arcdegree, arcdegrees |
|
|
258
|
+
| 4 | gon | ᵍ, grad, gradian, gradians |
|
|
259
|
+
| 5 | cir | circle, circles |
|
|
260
|
+
| 6 | mil | mils |
|
|
261
|
+
| 7 | rev | revolution, revolutions |
|
|
262
|
+
| 8 | cyc | cycle, cycles |
|
|
263
|
+
| 9 | brad | b°, bdeg, binary degree, binary radian, binary degrees, binary radians |
|
|
264
|
+
| 10 | sign | signs |
|
|
265
|
+
| 11 | arcmin | ′, amin, arcminute, arcminutes |
|
|
266
|
+
| 12 | arcsec | ″, asec, arcsecond, arcseconds |
|
|
267
|
+
| 13 | octant | octants |
|
|
268
|
+
| 14 | sextant | sextants |
|
|
269
|
+
| 15 | quadrant | quadrants |
|
|
243
270
|
|
|
244
271
|
## 14. Solid angle or 3D angle
|
|
245
272
|
|
|
@@ -432,7 +459,7 @@ These units are defined in `UnitMeasurements::MagneticInduction`.
|
|
|
432
459
|
| # | Name | Aliases |
|
|
433
460
|
|:--|:--|:--|
|
|
434
461
|
| _1_ | _T*_ | _tesla, teslas_ |
|
|
435
|
-
| 2 | G | Gs, gauss
|
|
462
|
+
| 2 | G | Gs, gauss |
|
|
436
463
|
|
|
437
464
|
## 29. Magnetic field
|
|
438
465
|
|
|
@@ -478,12 +505,32 @@ These units are defined in `UnitMeasurements::Pressure`.
|
|
|
478
505
|
| # | Name | Aliases |
|
|
479
506
|
|:--|:--|:--|
|
|
480
507
|
| _1_ | _Pa*_ | _pascal, pascals_ |
|
|
481
|
-
| 2 |
|
|
482
|
-
| 3 |
|
|
483
|
-
| 4 |
|
|
484
|
-
| 5 |
|
|
485
|
-
| 6 |
|
|
486
|
-
| 7 |
|
|
508
|
+
| 2 | Ba | barye, baryes |
|
|
509
|
+
| 3 | pz | pieze, pièze |
|
|
510
|
+
| 4 | at | technical atmosphere, technical atmospheres |
|
|
511
|
+
| 5 | atm | atmosphere, atmospheres |
|
|
512
|
+
| 6 | bar | bars |
|
|
513
|
+
| 7 | psf | lb/ft², lb/ft^2, pound per square foot, pounds per square foot |
|
|
514
|
+
| 8 | psi | lb/in², lb/in^2, pound per square inch, pounds per square inch |
|
|
515
|
+
| 9 | ksi | kip per square inch, kilopound per square inch, kilopounds per square inch |
|
|
516
|
+
| 10 | Torr | torr |
|
|
517
|
+
| 11 | μmHg | micrometer of mercury, micrometers of mercury, micrometre of mercury, micrometres of mercury |
|
|
518
|
+
| 12 | mmHg | millimeter of mercury, millimeters of mercury, millimetre of mercury, millimetres of mercury |
|
|
519
|
+
| 13 | cmHg | centimeter of mercury, centimeters of mercury, centimetre of mercury, centimetres of mercury |
|
|
520
|
+
| 14 | inHg | ″Hg, inch of mercury, inches of mercury |
|
|
521
|
+
| 15 | ftHg | ′Hg, foot of mercury, feet of mercury |
|
|
522
|
+
| 16 | mH₂O | mH2O, meter of water, meters of water, metre of water, metres of water |
|
|
523
|
+
| 17 | dmH₂O | dmH2O, decimeter of water, decimeters of water, decimetre of water, decimetres of water |
|
|
524
|
+
| 18 | cmH₂O | cmH2O, centimeter of water, centimeters of water, centimetre of water, centimetres of water |
|
|
525
|
+
| 19 | mmH₂O | mmH2O, millimeter of water, millimeters of water, millimetre of water, millimetres of water |
|
|
526
|
+
| 20 | ftH₂O | ftH2O, foot of water, feet of water |
|
|
527
|
+
| 21 | inH₂O | inH2O, Aq, inAq, inch of water, inches of water, inch of water gauge, inches of water gauge, inch of water column, inches of water column |
|
|
528
|
+
| 22 | LT/ft² | LT/ft^2, long ton per square foot, long tons per square foot |
|
|
529
|
+
| 23 | tn/ft² | tn/ft^2, ton per square foot, tons per square foot, short ton per square foot, short tons per square foot |
|
|
530
|
+
| 24 | pdl/ft² | pdl/ft^2, poundal per square foot, poundals per square foot |
|
|
531
|
+
| 25 | kgf/m² | kgf/m^2, kilogram-force per square metre, kilogramme-force per square metre |
|
|
532
|
+
| 26 | kgf/mm² | kgf/mm^2, kilogram-force per square millimetre, kilogramme-force per square millimetre |
|
|
533
|
+
| 27 | kgf/dm² | kgf/dm^2, kilogram-force per square decimetre, kilogramme-force per square decimetre |
|
|
487
534
|
|
|
488
535
|
## 34. Torque or moment of force
|
|
489
536
|
|
|
@@ -538,7 +585,7 @@ These units are defined in `UnitMeasurements::Frequency`.
|
|
|
538
585
|
|
|
539
586
|
| # | Name | Aliases |
|
|
540
587
|
|:--|:--|:--|
|
|
541
|
-
| _1_ | _Hz*_ |
|
|
588
|
+
| _1_ | _Hz*_ | _hertz_ |
|
|
542
589
|
| 2 | rad/s | radian per second, radians per second |
|
|
543
590
|
| 3 | deg/s | °/s, degree per second, degrees per second |
|
|
544
591
|
| 4 | rev/s | rps, revolution per second, revolutions per second |
|
|
@@ -550,10 +597,30 @@ These units are defined in `UnitMeasurements::Power`.
|
|
|
550
597
|
| # | Name | Aliases |
|
|
551
598
|
|:--|:--|:--|
|
|
552
599
|
| _1_ | _W*_ | _watt, watts_ |
|
|
553
|
-
| 2 |
|
|
554
|
-
| 3 | hp |
|
|
555
|
-
| 4 |
|
|
600
|
+
| 2 | p | poncelet, poncelets |
|
|
601
|
+
| 3 | hp (M) | PS, metric horsepower |
|
|
602
|
+
| 4 | kgf⋅m | kgf*m, kilogramme-force meter, kilogram-force meter |
|
|
556
603
|
| 5 | cal/s | calorie per second, calories per second |
|
|
604
|
+
| 6 | cal/min | calorie per minute, calories per minute |
|
|
605
|
+
| 7 | cal/h | calorie per hour, calories per hour |
|
|
606
|
+
| 8 | l·atm/s | l*atm/s, litre-atmosphere per second, liter-atmosphere per second |
|
|
607
|
+
| 9 | l·atm/min | l*atm/min, litre-atmosphere per minute, liter-atmosphere per minute |
|
|
608
|
+
| 10 | l·atm/h | l*atm/h, litre-atmosphere per hour, liter-atmosphere per hour |
|
|
609
|
+
| 11 | atm⋅cm³/s | atm*cm^3/s, atmosphere-cubic centimetre per second, atmosphere-cubic centimeter per second |
|
|
610
|
+
| 12 | atm⋅cm³/min | atm*cm^3/min, atmosphere-cubic centimetre per minute, atmosphere-cubic centimeter per minute |
|
|
611
|
+
| 13 | atm⋅cm³/h | atm*cm^3/h, atmosphere-cubic centimetre per hour, atmosphere-cubic centimeter per hour |
|
|
612
|
+
| 14 | hp | hp (I), horsepower |
|
|
613
|
+
| 15 | ft⋅lbf/s | ft*lbf/s, foot pound-force per second |
|
|
614
|
+
| 16 | ft⋅lbf/min | ft*lbf/min, foot pound-force per minute |
|
|
615
|
+
| 17 | ft⋅lbf/h | ft*lbf/h, foot pound-force per hour |
|
|
616
|
+
| 18 | BTU/s | british thermal unit per second, british thermal units per second |
|
|
617
|
+
| 19 | BTU/min | british thermal unit per minute, british thermal units per minute |
|
|
618
|
+
| 20 | BTU/h | british thermal unit per hour, british thermal units per hour |
|
|
619
|
+
| 21 | erg/s | erg per second, ergs per second |
|
|
620
|
+
| 22 | lusec | lusecs |
|
|
621
|
+
| 23 | atm⋅ft³/s | atm*ft^3/s, atmosphere-cubic foot per second |
|
|
622
|
+
| 24 | atm⋅ft³/min | atm*ft^3/min, atmosphere-cubic foot per minute |
|
|
623
|
+
| 25 | atm⋅ft³/h | atm*ft^3/h, atmosphere-cubic foot per hour |
|
|
557
624
|
|
|
558
625
|
## 40. Energy
|
|
559
626
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: unit_measurements
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Harshal LADHE
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-11-
|
|
11
|
+
date: 2023-11-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|