unit_measurements 5.5.0 → 5.6.1
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 +18 -0
- data/Gemfile.lock +1 -1
- data/README.md +13 -11
- data/lib/unit_measurements/unit_groups/acceleration.rb +4 -4
- data/lib/unit_measurements/unit_groups/angular_acceleration.rb +4 -4
- data/lib/unit_measurements/unit_groups/angular_velocity.rb +13 -13
- data/lib/unit_measurements/unit_groups/density.rb +18 -5
- data/lib/unit_measurements/unit_groups/dynamic_viscosity.rb +2 -2
- data/lib/unit_measurements/unit_groups/electric_conductance.rb +1 -1
- data/lib/unit_measurements/unit_groups/electric_potential.rb +2 -2
- data/lib/unit_measurements/unit_groups/electric_quadrupole_moment.rb +1 -1
- data/lib/unit_measurements/unit_groups/electrical_capacitance.rb +1 -1
- data/lib/unit_measurements/unit_groups/electrical_elastance.rb +1 -1
- data/lib/unit_measurements/unit_groups/electrical_inductance.rb +1 -1
- data/lib/unit_measurements/unit_groups/electrical_resistance.rb +1 -1
- data/lib/unit_measurements/unit_groups/frequency.rb +3 -3
- data/lib/unit_measurements/unit_groups/illuminance.rb +3 -3
- data/lib/unit_measurements/unit_groups/kinetic_viscosity.rb +1 -1
- data/lib/unit_measurements/unit_groups/length.rb +1 -1
- data/lib/unit_measurements/unit_groups/luminance.rb +4 -3
- data/lib/unit_measurements/unit_groups/magnetic_field.rb +1 -1
- data/lib/unit_measurements/unit_groups/power.rb +2 -2
- data/lib/unit_measurements/unit_groups/radiation_absorbed_dose.rb +2 -1
- data/lib/unit_measurements/unit_groups/solid_angle.rb +3 -1
- data/lib/unit_measurements/unit_groups/time.rb +2 -0
- data/lib/unit_measurements/unit_groups/velocity.rb +13 -13
- data/lib/unit_measurements/unit_groups/volume.rb +21 -0
- data/lib/unit_measurements/version.rb +1 -1
- data/units.md +96 -75
- 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: 36ff08fd4410847cd93c13c849261ddc7c7638d5550d73461827e7947aa2e188
|
|
4
|
+
data.tar.gz: 952287fd15ec0fd62ec7b70e6751a555c47b0be5f28abdef5c1a2fdd432d9279
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 133041f8221f4e2993476a6761ffbd9d789aa2e890cbc91120d730e5f4be36c176083cefda6c29cb14efcb131f5f9ba8a58e0619bb1394e6900c09860a4c2c15
|
|
7
|
+
data.tar.gz: f3e8ddc100820a02e9700b06450bf2d51fe7968364bbabd37e1ff66184ec51d987d3f68d641b6c8b90fda34f9bfea31bc2991d92a2aa9ee646ad128e9a149d66
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [5.6.1](https://github.com/shivam091/unit_measurements/compare/v5.6.0...v5.6.1) - 2023-11-03
|
|
2
|
+
|
|
3
|
+
### What's removed
|
|
4
|
+
|
|
5
|
+
- Removed uneeded aliases from units.
|
|
6
|
+
- Removed test cases of all unit conversions other than primitive unit.
|
|
7
|
+
|
|
8
|
+
----------
|
|
9
|
+
|
|
10
|
+
## [5.6.0](https://github.com/shivam091/unit_measurements/compare/v5.5.0...v5.6.0) - 2023-10-31
|
|
11
|
+
|
|
12
|
+
### What's new
|
|
13
|
+
|
|
14
|
+
- Added new units `ftm³`, `pk`, `gt`, `bsh`, `min`, `bkt`, `hhd`, `fls`, `dspn`, `fldr`, `bdft`, `ac⋅ft`, `ac⋅in` in volume.
|
|
15
|
+
- Added new units `oz/ft³`, `oz/in³`, `oz/gal`, `lb/ft³`, `lb/in³`, `lb/gal`, `slug/ft³`, `slug/in³` in density.
|
|
16
|
+
|
|
17
|
+
----------
|
|
18
|
+
|
|
1
19
|
## [5.5.0](https://github.com/shivam091/unit_measurements/compare/v5.4.1...v5.5.0) - 2023-10-29
|
|
2
20
|
|
|
3
21
|
### What's new
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -23,15 +23,17 @@ to numerous errors.
|
|
|
23
23
|
The `unit_measurements` gem is designed to simplify the handling of units for scientific calculations.
|
|
24
24
|
|
|
25
25
|
## Key Features
|
|
26
|
-
|
|
26
|
+
|
|
27
|
+
1. **Flexible Measurement Conversion:** Easily convert measurements between compatible units, reducing the likelihood of errors in scientific calculations.
|
|
27
28
|
2. **Extensible Unit Groups:** Effortlessly build own unit groups with specific units and conversions tailored to your needs.
|
|
28
29
|
3. **Built-in Unit Groups:** Comes bundled with a wide range of standard [unit groups](https://github.com/shivam091/unit_measurements/blob/main/units.md),
|
|
29
30
|
covering various units.
|
|
30
31
|
4. **String Parsing Capabilities:** Effortlessly parse strings representing complex, fractional, mixed fractional, scientific numbers, and ratios directly
|
|
31
32
|
saving you the hassle of manually extracting and converting them.
|
|
32
33
|
5. **Comprehensive Documentation:** Well-organized and descriptive [documentation](https://shivam091.github.io/unit_measurements) for quick reference and implementation guidance.
|
|
33
|
-
6. **
|
|
34
|
-
7. **
|
|
34
|
+
6. **Caching Support:** Option to cache conversion factors for improved performance.
|
|
35
|
+
7. **Configurable Options:** Fine-tune behavior with configurable options, including caching for enhanced performance.
|
|
36
|
+
8. **Error Handling:** Robust error handling ensures stability and reliability during conversions.
|
|
35
37
|
|
|
36
38
|
## Disclaimer
|
|
37
39
|
|
|
@@ -94,12 +96,12 @@ UnitMeasurements::Length.new(1, "km")
|
|
|
94
96
|
This gem allows you to convert among units of same unit group. You can convert measurement to other unit using `#convert_to`
|
|
95
97
|
(aliased as `#to`, `#in`, and `#as`) or `#convert_to!` (aliased as `#to!`, `#in!`, and `#as!`) methods.
|
|
96
98
|
|
|
97
|
-
These methods provide `use_cache` parameter which
|
|
99
|
+
These methods provide `use_cache` parameter which defaults to `false` to indicate whether the caching of conversion factors should happen.
|
|
98
100
|
|
|
99
101
|
You can use `#convert_to` as:
|
|
100
102
|
|
|
101
103
|
```ruby
|
|
102
|
-
UnitMeasurements::Length.new(1, "km").convert_to("m")
|
|
104
|
+
UnitMeasurements::Length.new(1, "km").convert_to("m", use_cache: true)
|
|
103
105
|
#=> 1000.0 m
|
|
104
106
|
```
|
|
105
107
|
|
|
@@ -120,13 +122,13 @@ UnitMeasurements::Length.new(1, "cm").convert_to("primitive")
|
|
|
120
122
|
You can also chain call of `#convert_to` and `#convert_to!` methods as:
|
|
121
123
|
|
|
122
124
|
```ruby
|
|
123
|
-
UnitMeasurements::Length.new(100, "m").convert_to("ft").convert_to!("in")
|
|
125
|
+
UnitMeasurements::Length.new(100, "m").convert_to("ft").convert_to!("in", use_cache: true)
|
|
124
126
|
#=> 3937.00787401574071916010498688 in
|
|
125
127
|
```
|
|
126
128
|
|
|
127
129
|
**Parse string without having to split out the quantity and source unit:**
|
|
128
130
|
|
|
129
|
-
This method provides `use_cache` parameter which
|
|
131
|
+
This method provides `use_cache` parameter which defaults to `false` to indicate whether the caching of conversion factors should happen.
|
|
130
132
|
|
|
131
133
|
```ruby
|
|
132
134
|
UnitMeasurements::Length.parse("1 km")
|
|
@@ -185,11 +187,11 @@ UnitMeasurements::Length.parse("1:2 km to m")
|
|
|
185
187
|
|
|
186
188
|
**Formatting measurement:**
|
|
187
189
|
|
|
188
|
-
If you want to format measurement to certain format, you can use `#
|
|
190
|
+
If you want to format the measurement to certain format, you can use `#to_fs` method.
|
|
189
191
|
If format is not specified, it defaults to `"%.2<value>f %<unit>s"`.
|
|
190
192
|
|
|
191
193
|
```ruby
|
|
192
|
-
UnitMeasurements::Length.new(100, "m").to("in").
|
|
194
|
+
UnitMeasurements::Length.new(100, "m").to("in").to_fs("%.4<quantity>f %<unit>s")
|
|
193
195
|
#=> "3937.0079 in"
|
|
194
196
|
```
|
|
195
197
|
|
|
@@ -424,7 +426,7 @@ units within it. You can group units by the unit system using the `system` metho
|
|
|
424
426
|
unit group using the `primitive` method. You can specify cache file name in unit group definition using the `cache` method.
|
|
425
427
|
|
|
426
428
|
```ruby
|
|
427
|
-
UnitMeasurements::
|
|
429
|
+
UnitMeasurements::MyUnitGroup = UnitMeasurements.build do
|
|
428
430
|
# Set primitive unit for the unit group (optional).
|
|
429
431
|
primitive "s"
|
|
430
432
|
|
|
@@ -444,7 +446,7 @@ UnitMeasurements::Time = UnitMeasurements.build do
|
|
|
444
446
|
end
|
|
445
447
|
|
|
446
448
|
# Sets the name of the cache file (optional).
|
|
447
|
-
cache "
|
|
449
|
+
cache "my_units_cache.json"
|
|
448
450
|
end
|
|
449
451
|
```
|
|
450
452
|
|
|
@@ -6,21 +6,21 @@ UnitMeasurements::Acceleration = UnitMeasurements.build do
|
|
|
6
6
|
primitive "m/s²"
|
|
7
7
|
|
|
8
8
|
system :metric do
|
|
9
|
-
unit "m/s²", aliases: ["m/s^2", "
|
|
9
|
+
unit "m/s²", aliases: ["m/s^2", "meter per second squared", "meters per second squared", "metre per second squared", "metres per second squared"]
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
system :imperial do
|
|
13
|
-
unit "in/s²", value: "0.0254 m/s²", aliases: ["in/s^2", "
|
|
13
|
+
unit "in/s²", value: "0.0254 m/s²", aliases: ["in/s^2", "ips²", "inch per second squared", "inches per second squared"]
|
|
14
14
|
unit "ipm/s", value: "0.0004233333 m/s²", aliases: ["in/(min⋅s)", "inch per minute per second", "inches per minute per second"]
|
|
15
15
|
unit "iph/s", value: "7.055555e-6 m/s²", aliases: ["in/(h⋅s)", "inch per hour per second", "inches per hour per second"]
|
|
16
16
|
|
|
17
|
-
unit "mi/s²", value: "1609.344 m/s²", aliases: ["mi/s^2", "
|
|
17
|
+
unit "mi/s²", value: "1609.344 m/s²", aliases: ["mi/s^2", "mps²", "mile per second squared", "miles per second squared"]
|
|
18
18
|
unit "mpm/s", value: "26.8224 m/s²", aliases: ["mi/(min⋅s)", "mile per minute per second", "miles per minute per second"]
|
|
19
19
|
unit "mph/s", value: "0.44704 m/s²", aliases: ["mi/(h⋅s)", "mile per hour per second", "miles per hour per second"]
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
system :foot_pound_second do
|
|
23
|
-
unit "ft/s²", value: "0.3048 m/s²", aliases: ["ft/s^2", "
|
|
23
|
+
unit "ft/s²", value: "0.3048 m/s²", aliases: ["ft/s^2", "fps²", "foot per second squared", "feet per second squared"]
|
|
24
24
|
unit "fpm/s", value: "0.00508 m/s²", aliases: ["ft/(min⋅s)", "foot per minute per second", "feet per minute per second"]
|
|
25
25
|
unit "fph/s", value: "8.466667e-5 m/s²", aliases: ["ft/(h⋅s)", "foot per hour per second", "feet per hour per second"]
|
|
26
26
|
end
|
|
@@ -6,9 +6,9 @@ UnitMeasurements::AngularAcceleration = UnitMeasurements.build do
|
|
|
6
6
|
primitive "rad/s²"
|
|
7
7
|
|
|
8
8
|
system :metric do
|
|
9
|
-
si_unit "rad/s²", aliases: ["rad/s^2", "
|
|
10
|
-
unit "gon/s²", value: [(Math::PI / 200), "rad/s²"], aliases: ["gon/s^2", "ᵍ/s²", "gon·s⁻²", "gradian per second squared", "gradians per second squared"]
|
|
11
|
-
end
|
|
9
|
+
si_unit "rad/s²", aliases: ["rad/s^2", "radian per second squared", "radians per second squared"]
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
unit "deg/s²", value: [(Math::PI / 180), "rad/s²"], aliases: ["°/s²", "deg/s^2", "degree per second squared", "degrees per second squared"]
|
|
12
|
+
unit "gon/s²", value: [(Math::PI / 200), "rad/s²"], aliases: ["ᵍ/s²", "gon/s^2", "gradian per second squared", "gradians per second squared"]
|
|
13
|
+
end
|
|
14
14
|
end
|
|
@@ -6,20 +6,20 @@ UnitMeasurements::AngularVelocity = UnitMeasurements.build do
|
|
|
6
6
|
primitive "rad/s"
|
|
7
7
|
|
|
8
8
|
system :metric do
|
|
9
|
-
unit "rad/s", aliases: ["
|
|
10
|
-
unit "rad/min", value: "1/60 rad/s", aliases: ["
|
|
11
|
-
unit "rad/h", value: "1/60 rad/min", aliases: ["
|
|
9
|
+
unit "rad/s", aliases: ["radian per second", "radians per second"]
|
|
10
|
+
unit "rad/min", value: "1/60 rad/s", aliases: ["radian per minute", "radians per minute"]
|
|
11
|
+
unit "rad/h", value: "1/60 rad/min", aliases: ["radian per hour", "radians per hour"]
|
|
12
12
|
|
|
13
|
-
unit "
|
|
14
|
-
unit "
|
|
15
|
-
unit "
|
|
16
|
-
end
|
|
13
|
+
unit "deg/s", value: [(Math::PI / 180), "rad/s"], aliases: ["°/s", "degree per second", "degrees per second"]
|
|
14
|
+
unit "deg/min", value: "1/60 deg/s", aliases: ["°/min", "degree per minute", "degrees per minute"]
|
|
15
|
+
unit "deg/h", value: "1/60 deg/min", aliases: ["°/h", "degree per hour", "degrees per hour"]
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
unit "gon/s", value: [(Math::PI / 200), "rad/s"], aliases: ["ᵍ/s", "gradian per second", "gradians per second"]
|
|
18
|
+
unit "gon/min", value: "1/60 gon/s", aliases: ["ᵍ/min", "gradian per minute", "gradians per minute"]
|
|
19
|
+
unit "gon/h", value: "1/60 gon/min", aliases: ["ᵍ/h", "gradian per hour", "gradians per hour"]
|
|
20
|
+
end
|
|
21
21
|
|
|
22
|
-
unit "rev/s", value: "360 deg/s", aliases: ["
|
|
23
|
-
unit "rev/min", value: "1/60 rev/s", aliases: ["
|
|
24
|
-
unit "rev/h", value: "1/60 rev/min", aliases: ["
|
|
22
|
+
unit "rev/s", value: "360 deg/s", aliases: ["revolution per second", "revolutions per second"]
|
|
23
|
+
unit "rev/min", value: "1/60 rev/s", aliases: ["revolution per minute", "revolutions per minute"]
|
|
24
|
+
unit "rev/h", value: "1/60 rev/min", aliases: ["revolution per hour", "revolutions per hour"]
|
|
25
25
|
end
|
|
@@ -6,11 +6,24 @@ UnitMeasurements::Density = UnitMeasurements.build do
|
|
|
6
6
|
primitive "kg/m³"
|
|
7
7
|
|
|
8
8
|
system :metric do
|
|
9
|
-
unit "g/m³", aliases: ["g/m^3", "
|
|
10
|
-
unit "
|
|
9
|
+
unit "g/m³", aliases: ["g/m^3", "gram per cubic meter", "grams per cubic meter", "gramme per cubic metre", "grammes per cubic metre"]
|
|
10
|
+
unit "g/l", value: "1 kg/m³", aliases: ["gram per liter", "grams per liter", "gramme per litre", "grammes per litre"]
|
|
11
|
+
unit "g/ml", value: "1000 g/l", aliases: ["gram per milliliter", "grams per milliliter", "gramme per millilitre", "grammes per millilitre"]
|
|
11
12
|
|
|
12
|
-
unit "
|
|
13
|
-
unit "
|
|
14
|
-
|
|
13
|
+
unit "kg/l", value: "1e+6 g/m³", aliases: ["kilogram per liter", "kilograms per liter", "kilogramme per litre", "kilogrammes per litre"]
|
|
14
|
+
unit "kg/m³", value: "1000 g/m³", aliases: ["kg/m^3", "kilogram per cubic meter", "kilograms per cubic meter", "kilogramme per cubic metre", "kilogrammes per cubic metre"]
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
system :imperial do
|
|
18
|
+
unit "oz/ft³", value: "1.001153961 kg/m³", aliases: ["oz/ft^3", "ounce per cubic foot", "ounces per cubic foot"]
|
|
19
|
+
unit "oz/in³", value: "1.729994044e+3 kg/m³", aliases: ["oz/in^3", "ounce per cubic inch", "ounces per cubic inch"]
|
|
20
|
+
unit "oz/gal", value: "6.236023291 kg/m³", aliases: ["ounce per gallon", "ounces per gallon"]
|
|
21
|
+
|
|
22
|
+
unit "lb/ft³", value: "16.01846337 kg/m³", aliases: ["lb/ft^3", "pound per cubic foot", "pounds per cubic foot"]
|
|
23
|
+
unit "lb/in³", value: "2.767990471e+4 kg/m³", aliases: ["lb/in^3", "pound per cubic inch", "pounds per cubic inch"]
|
|
24
|
+
unit "lb/gal", value: "99.77637266 kg/m³", aliases: ["pound per gallon", "pounds per gallon"]
|
|
25
|
+
|
|
26
|
+
unit "slug/ft³", value: "515.3788184 kg/m³", aliases: ["slug/ft^3", "slug per cubic foot", "slugs per cubic foot"]
|
|
27
|
+
unit "slug/in³", value: "890574.582782 kg/m³", aliases: ["slug/in^3", "slug per cubic inch", "slugs per cubic inch"]
|
|
15
28
|
end
|
|
16
29
|
end
|
|
@@ -15,8 +15,8 @@ UnitMeasurements::DynamicViscosity = UnitMeasurements.build do
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
system :foot_pound_second do
|
|
18
|
-
unit "lb/(ft⋅s)", value: "1.488164 Pa⋅s", aliases: ["lb/(ft*s)", "pound per foot second"]
|
|
19
|
-
unit "lb/(ft⋅h)", value: "0.0004133789 Pa⋅s", aliases: ["lb/(ft*h)", "pound per foot hour"]
|
|
18
|
+
unit "lb/(ft⋅s)", value: "1.488164 Pa⋅s", aliases: ["lb/(ft*s)", "pound per foot second", "pounds per foot second"]
|
|
19
|
+
unit "lb/(ft⋅h)", value: "0.0004133789 Pa⋅s", aliases: ["lb/(ft*h)", "pound per foot hour", "pounds per foot hour"]
|
|
20
20
|
|
|
21
21
|
unit "(lbf⋅s)/ft²", value: "47.88026 Pa⋅s", aliases: ["(lb⋅s)/ft²", "(lbf*s)/ft^2", "(lb*s)/ft^2", "pound-force second per square foot"]
|
|
22
22
|
unit "(lbf⋅s)/in²", value: "6894.757 Pa⋅s", aliases: ["(lb⋅s)/in²", "(lbf*s)/in^2", "(lb*s)/in^2", "pound-force second per square inch"]
|
|
@@ -8,7 +8,7 @@ UnitMeasurements::ElectricConductance = UnitMeasurements.build do
|
|
|
8
8
|
system :metric do
|
|
9
9
|
si_unit "S", aliases: ["℧", "Ω⁻¹", "siemens", "mho", "mhos"]
|
|
10
10
|
|
|
11
|
-
unit "A/V", value: "1 S", aliases: ["
|
|
11
|
+
unit "A/V", value: "1 S", aliases: ["amp/volt", "amps/volt", "ampere/volt", "amperes/volt", "ampere per volt", "amperes per volt"]
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
system :centimetre_gram_second do
|
|
@@ -8,8 +8,8 @@ UnitMeasurements::ElectricPotential = UnitMeasurements.build do
|
|
|
8
8
|
system :metric do
|
|
9
9
|
si_unit "V", aliases: ["volt", "volts"]
|
|
10
10
|
|
|
11
|
-
unit "W/A", value: "1 V", aliases: ["
|
|
12
|
-
unit "J/C", value: "1 V", aliases: ["
|
|
11
|
+
unit "W/A", value: "1 V", aliases: ["watt per ampere", "watts per ampere"]
|
|
12
|
+
unit "J/C", value: "1 V", aliases: ["joule per coulomb", "joules per coulomb"]
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
system :centimetre_gram_second do
|
|
@@ -10,7 +10,7 @@ UnitMeasurements::ElectricQuadrupoleMoment = UnitMeasurements.build do
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
system :centimetre_gram_second do
|
|
13
|
-
unit "statC·cm²", value: "3.335641e-14 C·m²", aliases: ["statC*m^2", "statcoulomb square meter", "statcoulomb square metre"]
|
|
14
13
|
unit "B", value: "1e-26 statC·cm²", aliases: ["buckingham", "buckinghams"]
|
|
14
|
+
unit "statC·cm²", value: "3.335641e-14 C·m²", aliases: ["statC*m^2", "statcoulomb square meter", "statcoulomb square metre"]
|
|
15
15
|
end
|
|
16
16
|
end
|
|
@@ -8,7 +8,7 @@ UnitMeasurements::ElectricalCapacitance = UnitMeasurements.build do
|
|
|
8
8
|
system :metric do
|
|
9
9
|
si_unit "F", aliases: ["farad", "farads"]
|
|
10
10
|
|
|
11
|
-
unit "C/V", value: "1 F", aliases: ["
|
|
11
|
+
unit "C/V", value: "1 F", aliases: ["coulomb/volt", "coulombs/volt", "coulomb per volt", "coulombs per volt"]
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
system :centimetre_gram_second do
|
|
@@ -8,6 +8,6 @@ UnitMeasurements::ElectricalElastance = UnitMeasurements.build do
|
|
|
8
8
|
system :metric do
|
|
9
9
|
si_unit "D", aliases: ["F⁻¹", "daraf", "darafs", "reciprocal farad", "reciprocal farads"]
|
|
10
10
|
|
|
11
|
-
unit "V/C", value: "1 D", aliases: ["
|
|
11
|
+
unit "V/C", value: "1 D", aliases: ["volt/coulomb", "volts/coulomb", "volt per coulomb", "volts per coulomb"]
|
|
12
12
|
end
|
|
13
13
|
end
|
|
@@ -8,7 +8,7 @@ UnitMeasurements::ElectricalInductance = UnitMeasurements.build do
|
|
|
8
8
|
system :metric do
|
|
9
9
|
si_unit "H", aliases: ["henry", "henries"]
|
|
10
10
|
|
|
11
|
-
unit "Wb/A", value: "1 H", aliases: ["
|
|
11
|
+
unit "Wb/A", value: "1 H", aliases: ["weber per ampere", "webers per ampere"]
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
system :centimetre_gram_second do
|
|
@@ -9,7 +9,7 @@ UnitMeasurements::ElectricalResistance = UnitMeasurements.build do
|
|
|
9
9
|
si_unit "Ω", aliases: ["ω", "ohm", "ohms", "reciprocal siemens"]
|
|
10
10
|
|
|
11
11
|
unit "S", value: "1 Ω", aliases: ["siemens", "mho", "mhos"]
|
|
12
|
-
unit "V/A", value: "1 Ω", aliases: ["
|
|
12
|
+
unit "V/A", value: "1 Ω", aliases: ["volt/amp", "volts/amp", "volt/ampere", "volts/ampere", "volt per ampere", "volts per ampere"]
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
system :centimetre_gram_second do
|
|
@@ -8,9 +8,9 @@ UnitMeasurements::Frequency = UnitMeasurements.build do
|
|
|
8
8
|
system :metric do
|
|
9
9
|
si_unit "Hz", aliases: ["hertz", "hertzes"]
|
|
10
10
|
|
|
11
|
-
unit "
|
|
11
|
+
unit "deg/s", value: [Rational(1, 360), "Hz"], aliases: ["°/s", "degree per second", "degrees per second"]
|
|
12
|
+
unit "rad/s", value: [Rational(1, (2 * Math::PI)), "Hz"], aliases: ["radian per second", "radians per second"]
|
|
12
13
|
end
|
|
13
14
|
|
|
14
|
-
unit "
|
|
15
|
-
unit "rev/s", value: [1, "Hz"], aliases: ["rps", "rev·s⁻¹", "revolution per second", "revolutions per second"]
|
|
15
|
+
unit "rev/s", value: [1, "Hz"], aliases: ["rps", "revolution per second", "revolutions per second"]
|
|
16
16
|
end
|
|
@@ -6,15 +6,15 @@ UnitMeasurements::Illuminance = UnitMeasurements.build do
|
|
|
6
6
|
primitive "lx"
|
|
7
7
|
|
|
8
8
|
system :metric do
|
|
9
|
-
si_unit "lx", aliases: ["lux", "lm/m²", "lm/m^2", "
|
|
9
|
+
si_unit "lx", aliases: ["lux", "lm/m²", "lm/m^2", "lumen per square metre", "lumen per square meter"]
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
system :centimetre_gram_second do
|
|
13
|
-
unit "ph", value: "10000 lx", aliases: ["phot", "phots", "lm/cm²", "lm/cm^2", "
|
|
13
|
+
unit "ph", value: "10000 lx", aliases: ["phot", "phots", "lm/cm²", "lm/cm^2", "lumen per square centimetre", "lumen per square centimeter"]
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
system :us_customary do
|
|
17
|
-
unit "fc", value: "10.763910417 lx", aliases: ["footcandle", "lm/ft²", "lm/ft^2", "
|
|
17
|
+
unit "fc", value: "10.763910417 lx", aliases: ["footcandle", "lm/ft²", "lm/ft^2", "lumen per square foot"]
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
unit "nx", value: "1 mlx", aliases: ["nox"]
|
|
@@ -17,7 +17,7 @@ UnitMeasurements::Length = UnitMeasurements.build do
|
|
|
17
17
|
unit "in", value: "25.4 mm", aliases: ['"', "inch", "inches"]
|
|
18
18
|
unit "ft", value: "12 in", aliases: ["'", "foot", "feet"]
|
|
19
19
|
unit "yd", value: "3 ft", aliases: ["yard", "yards"]
|
|
20
|
-
unit "mi", value: "5280 ft", aliases: ["mile", "miles", "statute mile", "international mile"]
|
|
20
|
+
unit "mi", value: "5280 ft", aliases: ["mile", "miles", "statute mile", "international mile", "statute miles", "international miles"]
|
|
21
21
|
unit "ch", value: "22 yd", aliases: ["chain", "chains"]
|
|
22
22
|
unit "th", value: "1/1000 in", aliases: ["thou", "thousandth of an inch", "mil", "mils"]
|
|
23
23
|
unit "nl", value: "3 nmi", aliases: ["NL", "nleague", "nleagues", "nautical league", "nautical leagues"]
|
|
@@ -6,13 +6,14 @@ UnitMeasurements::Luminance = UnitMeasurements.build do
|
|
|
6
6
|
primitive "cd/m²"
|
|
7
7
|
|
|
8
8
|
system :metric do
|
|
9
|
-
unit "cd/m²", aliases: ["cd/m^2", "
|
|
9
|
+
unit "cd/m²", aliases: ["cd/m^2", "candela per square metre", "candelas per square metre", "candela per square meter", "candelas per square meter"]
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
system :us_customary do
|
|
13
|
-
unit "cd/in²", value: "1550.0031 cd/m²", aliases: ["cd/in^2", "cd·in⁻²", "candela per square inch", "candelas per square inch"]
|
|
14
|
-
unit "cd/ft²", value: "10.763910417 cd/m²", aliases: ["cd/ft^2", "cd·ft⁻²", "candela per square foot", "candelas per square foot"]
|
|
15
13
|
unit "fL", value: [Rational(1, Math::PI), "cd/ft²"], aliases: ["ft-L", "foot lambert", "foot-lambert"]
|
|
14
|
+
|
|
15
|
+
unit "cd/in²", value: "1550.0031 cd/m²", aliases: ["cd/in^2", "candela per square inch", "candelas per square inch"]
|
|
16
|
+
unit "cd/ft²", value: "10.763910417 cd/m²", aliases: ["cd/ft^2", "candela per square foot", "candelas per square foot"]
|
|
16
17
|
end
|
|
17
18
|
|
|
18
19
|
system :centimetre_gram_second do
|
|
@@ -8,6 +8,6 @@ UnitMeasurements::MagneticField = UnitMeasurements.build do
|
|
|
8
8
|
system :metric do
|
|
9
9
|
si_unit "Oe", aliases: ["oersted", "oersteds"]
|
|
10
10
|
|
|
11
|
-
unit "A/m", value: [(Math::PI / 250), "Oe"], aliases: ["
|
|
11
|
+
unit "A/m", value: [(Math::PI / 250), "Oe"], aliases: ["ampere/meter", "ampere/metre", "amperes/meter", "amperes/metre", "ampere per meter", "ampere per metre", "amperes per meter", "amperes per metre"]
|
|
12
12
|
end
|
|
13
13
|
end
|
|
@@ -16,8 +16,8 @@ UnitMeasurements::Power = UnitMeasurements.build do
|
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
system :centimetre_gram_second do
|
|
19
|
-
unit "erg/s", value: "1e-7 W", aliases: ["erg
|
|
19
|
+
unit "erg/s", value: "1e-7 W", aliases: ["erg per second", "ergs per second"]
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
-
unit "cal/s", value: "4.1868 W", aliases: ["
|
|
22
|
+
unit "cal/s", value: "4.1868 W", aliases: ["calorie per second", "calories per second"]
|
|
23
23
|
end
|
|
@@ -10,7 +10,8 @@ UnitMeasurements::RadiationAbsorbedDose = UnitMeasurements.build do
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
system :centimetre_gram_second do
|
|
13
|
-
unit "erg/g", value: "1e-4 Gy", aliases: ["erg per gram", "erg per gramme", "ergs per gram", "ergs per gramme"]
|
|
14
13
|
unit "rad", value: "0.01 Gy", aliases: ["radiation absorbed dose"]
|
|
14
|
+
|
|
15
|
+
unit "erg/g", value: "1e-4 Gy", aliases: ["erg per gram", "erg per gramme", "ergs per gram", "ergs per gramme"]
|
|
15
16
|
end
|
|
16
17
|
end
|
|
@@ -7,10 +7,12 @@ UnitMeasurements::SolidAngle = UnitMeasurements.build do
|
|
|
7
7
|
|
|
8
8
|
system :metric do
|
|
9
9
|
si_unit "sr", aliases: ["steradian", "steradians"]
|
|
10
|
+
|
|
11
|
+
unit "deg²", value: [((Math::PI / 180) ** 2), "sr"], aliases: ["(°)²", "sq °", "square degree", "square degrees"] # (π / 180)² sr
|
|
10
12
|
end
|
|
11
13
|
|
|
12
14
|
unit "sp", value: [(4 * Math::PI), "sr"], aliases: ["spat", "spats"] # (4 * π) sr
|
|
13
|
-
|
|
15
|
+
|
|
14
16
|
unit "arcmin²", value: [(Rational(1, 60) ** 2), "deg²"], aliases: ["(′)²", "sq ′", "square arcminute", "square arcminutes"] # ((π / 180) * (1 / 60))² sr
|
|
15
17
|
unit "arcsec²", value: [(Rational(1, 60) ** 2), "arcmin²"], aliases: ["(″)²", "sq ″", "square arcsecond", "square arcseconds"] # ((π / 180) * (1 / 3600))² sr
|
|
16
18
|
end
|
|
@@ -16,8 +16,10 @@ UnitMeasurements::Time = UnitMeasurements.build do
|
|
|
16
16
|
unit "wk", value: "7 d", aliases: ["week", "weeks"]
|
|
17
17
|
unit "mo", value: "30.4167 d", aliases: ["month", "months"]
|
|
18
18
|
unit "yr", value: "365 d", aliases: ["y", "year", "years"]
|
|
19
|
+
|
|
19
20
|
unit "ftn", value: "2 wk", aliases: ["4tnite", "fortnight", "fortnights"]
|
|
20
21
|
unit "qtr", value: "3 mo", aliases: ["quarter", "quarters"]
|
|
21
22
|
unit "dec", value: "10 y", aliases: ["decade", "decades"]
|
|
23
|
+
|
|
22
24
|
unit "cent", value: "10 dec", aliases: ["century", "centuries"]
|
|
23
25
|
end
|
|
@@ -6,29 +6,29 @@ UnitMeasurements::Velocity = UnitMeasurements.build do
|
|
|
6
6
|
primitive "m/s"
|
|
7
7
|
|
|
8
8
|
system :metric do
|
|
9
|
-
unit "m/s", aliases: ["
|
|
10
|
-
unit "m/min", value: "1/60 m/s", aliases: ["
|
|
11
|
-
unit "m/h", value: "1/60 m/min", aliases: ["
|
|
9
|
+
unit "m/s", aliases: ["meter per second", "meters per second", "metre per second", "metres per second"]
|
|
10
|
+
unit "m/min", value: "1/60 m/s", aliases: ["meter per minute", "meters per minute", "metre per minute", "metres per minute"]
|
|
11
|
+
unit "m/h", value: "1/60 m/min", aliases: ["meter per hour", "meters per hour", "metre per hour", "metres per hour"]
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
system :imperial do
|
|
15
|
-
unit "in/s", value: "0.0254 m/s", aliases: ["
|
|
16
|
-
unit "in/min", value: "1/60 in/s", aliases: ["
|
|
17
|
-
unit "in/h", value: "1/60 in/min", aliases: ["
|
|
15
|
+
unit "in/s", value: "0.0254 m/s", aliases: ["ips", "inch per second", "inches per second"]
|
|
16
|
+
unit "in/min", value: "1/60 in/s", aliases: ["ipm", "inch per minute", "inches per minute"]
|
|
17
|
+
unit "in/h", value: "1/60 in/min", aliases: ["iph", "inch per hour", "inches per hour"]
|
|
18
18
|
|
|
19
|
-
unit "mi/s", value: "1609.344 m/s", aliases: ["
|
|
20
|
-
unit "mi/min", value: "1/60 mi/s", aliases: ["
|
|
21
|
-
unit "mi/h", value: "1/60 mi/min", aliases: ["
|
|
19
|
+
unit "mi/s", value: "1609.344 m/s", aliases: ["mps", "mile per second", "miles per second"]
|
|
20
|
+
unit "mi/min", value: "1/60 mi/s", aliases: ["mpm", "mile per minute", "miles per minute"]
|
|
21
|
+
unit "mi/h", value: "1/60 mi/min", aliases: ["mph", "mile per hour", "miles per hour"]
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
system :foot_pound_second do
|
|
25
|
-
unit "ft/s", value: "12 in/s", aliases: ["
|
|
26
|
-
unit "ft/min", value: "1/60 ft/s", aliases: ["
|
|
27
|
-
unit "ft/h", value: "1/60 ft/min", aliases: ["
|
|
25
|
+
unit "ft/s", value: "12 in/s", aliases: ["fps", "foot per second", "feet per second"]
|
|
26
|
+
unit "ft/min", value: "1/60 ft/s", aliases: ["fpm", "foot per minute", "feet per minute"]
|
|
27
|
+
unit "ft/h", value: "1/60 ft/min", aliases: ["fph", "foot per hour", "feet per hour"]
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
system :furlong_firkin_fortnight do
|
|
31
|
-
unit "fur/ftn", value: "1.663e-4 m/s", aliases: ["
|
|
31
|
+
unit "fur/ftn", value: "1.663e-4 m/s", aliases: ["furlong per fortnight", "furlongs per fortnight"]
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
system :meteorology_aviation_maritime do
|
|
@@ -9,6 +9,7 @@ UnitMeasurements::Volume = UnitMeasurements.build do
|
|
|
9
9
|
si_unit "l", aliases: ["liter", "litre", "liters", "litres"]
|
|
10
10
|
|
|
11
11
|
unit "m³", value: "1000 l", aliases: ["m^3", "cu m", "cubic meter", "cubic meters", "cubic metre", "cubic metres"]
|
|
12
|
+
|
|
12
13
|
unit "mm³", value: "1e-9 m³", aliases: ["mm^3", "cu mm", "cubic millimeter", "cubic millimeters", "cubic millimetre", "cubic millimetres"]
|
|
13
14
|
unit "cm³", value: "1e-6 m³", aliases: ["cm^3", "cu cm", "cubic centimeter", "cubic centimeters", "cubic centimetre", "cubic centimetres"]
|
|
14
15
|
unit "dm³", value: "1 l", aliases: ["dm^3", "cu dm", "cubic decimeter", "cubic decimeters", "cubic decimetre", "cubic decimetres"]
|
|
@@ -20,15 +21,35 @@ UnitMeasurements::Volume = UnitMeasurements.build do
|
|
|
20
21
|
unit "ft³", value: "1728 in³", aliases: ["ft^3", "cu ft", "cubic foot", "cubic feet"]
|
|
21
22
|
unit "yd³", value: "27 ft³", aliases: ["yd^3", "cu yd", "cubic yard", "cubic yards"]
|
|
22
23
|
unit "mi³", value: "5451776000 yd³", aliases: ["mi^3", "cu mi", "cubic mile", "cubic miles"]
|
|
24
|
+
unit "ftm³", value: "216 ft³", aliases: ["ftm^3", "cu ftm", "cubic fathom", "cubic fathoms"]
|
|
23
25
|
|
|
24
26
|
unit "c", value: "284.130625e-6 m³", aliases: ["cup", "cups"]
|
|
27
|
+
|
|
25
28
|
unit "qt", value: "0.0011365225 m³", aliases: ["quart", "quarts"]
|
|
29
|
+
unit "pk", value: "2 gal", aliases: ["peck", "pecks"]
|
|
26
30
|
unit "gi", value: "1/2 c", aliases: ["gill", "gills"]
|
|
27
31
|
unit "pt", value: "1/8 gal", aliases: ["pint", "pints"]
|
|
32
|
+
unit "gt", value: "1/288 floz", aliases: ["gtt", "drop", "drops"]
|
|
33
|
+
|
|
28
34
|
unit "gal", value: "4.54609 dm³", aliases: ["gallon", "gallons"]
|
|
35
|
+
unit "bsh", value: "8 gal", aliases: ["bu", "bushel", "bushels"]
|
|
36
|
+
unit "min", value: "1/480 floz", aliases: ["minim", "minims"]
|
|
29
37
|
unit "bbl", value: "36 gal", aliases: ["barrel", "barrels"]
|
|
30
38
|
unit "tsp", value: "1/24 gi", aliases: ["teaspoon", "teaspoons"]
|
|
39
|
+
unit "bkt", value: "4 gal", aliases: ["bucket", "buckets"]
|
|
40
|
+
unit "hhd", value: "2 bbl", aliases: ["hogshead", "hogsheads"]
|
|
41
|
+
unit "fls", value: "1/24 floz", aliases: ["fluid scruple", "fluid scruples"]
|
|
42
|
+
|
|
43
|
+
unit "dspn", value: "10 ml", aliases: ["dsp", "dessertspoon", "dessertspoons"]
|
|
31
44
|
unit "tbsp", value: "3 tsp", aliases: ["tbs", "tablespoon", "tablespoons"]
|
|
32
45
|
unit "floz", value: "1/160 gal", aliases: ["fluid ounce", "fluid ounces"]
|
|
46
|
+
unit "fldr", value: "1/8 floz", aliases: ["fluid drachm", "fluid drachms"]
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
system :us_customary do
|
|
50
|
+
unit "bdft", value: "144 in³", aliases: ["bf", "fbm", "board-foot", "board-feet"]
|
|
51
|
+
|
|
52
|
+
unit "ac⋅ft", value: "43560 ft³", aliases: ["acre-foot", "acre-feet"]
|
|
53
|
+
unit "ac⋅in", value: "6272640 in³", aliases: ["acre-inch", "acre-inches"]
|
|
33
54
|
end
|
|
34
55
|
end
|
data/units.md
CHANGED
|
@@ -9,7 +9,7 @@ check below list of bundled units before converting your measurements.
|
|
|
9
9
|
|:--|:--|
|
|
10
10
|
| * | supports [decimal SI prefixes](README.md#decimal-si-prefixes) |
|
|
11
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
|
|
15
15
|
|
|
@@ -23,7 +23,7 @@ These units are defined in `UnitMeasurements::Length`.
|
|
|
23
23
|
| 4 | in | ", inch, inches |
|
|
24
24
|
| 5 | ft | ', foot, feet |
|
|
25
25
|
| 6 | yd | yard, yards |
|
|
26
|
-
| 7 | mi | mile, miles, statute mile, international mile |
|
|
26
|
+
| 7 | mi | mile, miles, statute mile, international mile, statute miles, international miles |
|
|
27
27
|
| 8 | ch | chain, chains |
|
|
28
28
|
| 9 | th | thou, thousandth of an inch, mil, mils |
|
|
29
29
|
| 10 | au | astronomical unit, astronomical units |
|
|
@@ -160,15 +160,28 @@ These units are defined in `UnitMeasurements::Volume`.
|
|
|
160
160
|
| 8 | ft³ | ft^3, cu ft, cubic foot, cubic feet |
|
|
161
161
|
| 9 | yd³ | yd^3, cu yd, cubic yard, cubic yards |
|
|
162
162
|
| 10 | mi³ | mi^3, cu mi, cubic mile, cubic miles |
|
|
163
|
-
| 11 |
|
|
164
|
-
| 12 |
|
|
165
|
-
| 13 |
|
|
166
|
-
| 14 |
|
|
167
|
-
| 15 |
|
|
168
|
-
| 16 |
|
|
169
|
-
| 17 |
|
|
170
|
-
| 18 |
|
|
171
|
-
| 19 |
|
|
163
|
+
| 11 | ftm³ | ftm^3, cu ftm, cubic fathom, cubic fathoms |
|
|
164
|
+
| 12 | c | cup, cups |
|
|
165
|
+
| 13 | qt | quart, quarts |
|
|
166
|
+
| 14 | gi | gill, gills |
|
|
167
|
+
| 15 | pt | pint, pints |
|
|
168
|
+
| 16 | pk | peck, pecks |
|
|
169
|
+
| 17 | gt | gtt, drop, drops |
|
|
170
|
+
| 18 | gal | gallon, gallons |
|
|
171
|
+
| 19 | bbl | barrel, barrels |
|
|
172
|
+
| 20 | tsp | teaspoon, teaspoons |
|
|
173
|
+
| 21 | bsh | bu, bushel, bushels |
|
|
174
|
+
| 22 | min | minim, minims |
|
|
175
|
+
| 23 | bkt | bucket, buckets |
|
|
176
|
+
| 24 | hhd | hogshead, hogsheads |
|
|
177
|
+
| 25 | fls | fluid scruple, fluid scruples |
|
|
178
|
+
| 26 | dspn | dsp, dessertspoon, dessertspoons |
|
|
179
|
+
| 27 | fldr | fluid drachm, fluid drachms |
|
|
180
|
+
| 28 | bdft | bf, fbm, board-foot, board-feet |
|
|
181
|
+
| 29 | tbsp | tbs, tablespoon, tablespoons |
|
|
182
|
+
| 30 | floz | fluid ounce, fluid ounces |
|
|
183
|
+
| 31 | ac⋅ft | acre-foot, acre-feet |
|
|
184
|
+
| 32 | ac⋅in | acre-inch, acre-inches |
|
|
172
185
|
|
|
173
186
|
## 10. Density
|
|
174
187
|
|
|
@@ -176,11 +189,19 @@ These units are defined in `UnitMeasurements::Density`.
|
|
|
176
189
|
|
|
177
190
|
| # | Name | Aliases |
|
|
178
191
|
|:--|:--|:--|
|
|
179
|
-
| 1 | g/m³ | g/m^3,
|
|
180
|
-
| _2_ | _kg/m³_ | _kg/m^3,
|
|
181
|
-
| 3 | g/l |
|
|
182
|
-
| 4 | g/ml |
|
|
183
|
-
| 5 | kg/l |
|
|
192
|
+
| 1 | g/m³ | g/m^3, gram per cubic meter, grams per cubic meter, gramme per cubic metre, grammes per cubic metre |
|
|
193
|
+
| _2_ | _kg/m³_ | _kg/m^3, kilogram per cubic meter, kilograms per cubic meter, kilogramme per cubic metre, kilogrammes per cubic metre_ |
|
|
194
|
+
| 3 | g/l | gram per liter, grams per liter, gramme per litre, grammes per litre |
|
|
195
|
+
| 4 | g/ml | gram per milliliter, grams per milliliter, gramme per millilitre, grammes per millilitre |
|
|
196
|
+
| 5 | kg/l | kilogram per liter, kilograms per liter, kilogramme per litre, kilogrammes per litre |
|
|
197
|
+
| 6 | oz/ft³ | oz/ft^3, ounce per cubic foot, ounces per cubic foot |
|
|
198
|
+
| 7 | oz/in³ | oz/in^3, ounce per cubic inch, ounces per cubic inch |
|
|
199
|
+
| 8 | oz/gal | ounce per gallon, ounces per gallon |
|
|
200
|
+
| 9 | lb/ft³ | lb/ft^3, pound per cubic foot, pounds per cubic foot |
|
|
201
|
+
| 10 | lb/in³ | lb/in^3, pound per cubic inch, pounds per cubic inch |
|
|
202
|
+
| 11 | lb/gal | pound per gallon, pounds per gallon |
|
|
203
|
+
| 12 | slug/ft³ | slug/ft^3, slug per cubic foot, slugs per cubic foot |
|
|
204
|
+
| 13 | slug/in³ | slug/in^3, slug per cubic inch, slugs per cubic inch |
|
|
184
205
|
|
|
185
206
|
## 11. Quantity
|
|
186
207
|
|
|
@@ -253,19 +274,19 @@ These units are defined in `UnitMeasurements::Velocity`.
|
|
|
253
274
|
| # | Name | Aliases |
|
|
254
275
|
|:--|:--|:--|
|
|
255
276
|
| 1 | Kn | kt, knot, knots |
|
|
256
|
-
| _2_ | _m/s_ |
|
|
257
|
-
| 3 | m/min |
|
|
258
|
-
| 4 | m/h |
|
|
259
|
-
| 5 | in/s |
|
|
260
|
-
| 6 | in/min |
|
|
261
|
-
| 7 | in/h |
|
|
262
|
-
| 8 | ft/s |
|
|
263
|
-
| 9 | ft/min |
|
|
264
|
-
| 10 | ft/h |
|
|
265
|
-
| 11 | mi/s |
|
|
266
|
-
| 12 | mi/min |
|
|
267
|
-
| 13 | mi/h |
|
|
268
|
-
| 14 | fur/ftn |
|
|
277
|
+
| _2_ | _m/s_ | _meter per second, meters per second, metre per second, metres per second_ |
|
|
278
|
+
| 3 | m/min | meter per minute, meters per minute, metre per minute, metres per minute |
|
|
279
|
+
| 4 | m/h | meter per hour, meters per hour, metre per hour, metres per hour |
|
|
280
|
+
| 5 | in/s | ips, inch per second, inches per second |
|
|
281
|
+
| 6 | in/min | ipm, inch per minute, inches per minute |
|
|
282
|
+
| 7 | in/h | iph, inch per hour, inches per hour |
|
|
283
|
+
| 8 | ft/s | fps, foot per second, feet per second |
|
|
284
|
+
| 9 | ft/min | fpm, foot per minute, feet per minute |
|
|
285
|
+
| 10 | ft/h | fph, foot per hour, feet per hour |
|
|
286
|
+
| 11 | mi/s | mps, mile per second, miles per second |
|
|
287
|
+
| 12 | mi/min | mpm, mile per minute, miles per minute |
|
|
288
|
+
| 13 | mi/h | mph, mile per hour, miles per hour |
|
|
289
|
+
| 14 | fur/ftn | furlong per fortnight, furlongs per fortnight |
|
|
269
290
|
|
|
270
291
|
## 17. Acceleration
|
|
271
292
|
|
|
@@ -274,17 +295,17 @@ These units are defined in `UnitMeasurements::Acceleration`.
|
|
|
274
295
|
| # | Name | Aliases |
|
|
275
296
|
|:--|:--|:--|
|
|
276
297
|
| 1 | Gal | gal, galileo |
|
|
277
|
-
| _2_ | _m/s²_ | _m/s^2,
|
|
278
|
-
| 3 | in/s² | in/s^2,
|
|
298
|
+
| _2_ | _m/s²_ | _m/s^2, meter per second squared, meters per second squared, metre per second squared, metres per second squared_ |
|
|
299
|
+
| 3 | in/s² | in/s^2, ips², inch per second squared, inches per second squared |
|
|
279
300
|
| 4 | ipm/s | in/(min⋅s), inch per minute per second, inches per minute per second |
|
|
280
301
|
| 5 | iph/s | in/(h⋅s), inch per hour per second, inches per hour per second |
|
|
281
|
-
|
|
|
282
|
-
|
|
|
283
|
-
|
|
|
284
|
-
|
|
|
285
|
-
|
|
|
286
|
-
|
|
|
287
|
-
|
|
|
302
|
+
| 6 | ft/s² | ft/s^2, fps², foot per second squared, feet per second squared |
|
|
303
|
+
| 7 | fpm/s | ft/(min⋅s), foot per minute per second, feet per minute per second |
|
|
304
|
+
| 8 | fph/s | ft/(h⋅s), foot per hour per second, feet per hour per second |
|
|
305
|
+
| 9 | mi/s² | mi/s^2, mps², mile per second squared, miles per second squared |
|
|
306
|
+
| 10 | mpm/s | mi/(min⋅s), mile per minute per second, miles per minute per second |
|
|
307
|
+
| 11 | mph/s | mi/(h⋅s), mile per hour per second, miles per hour per second |
|
|
308
|
+
| 12 | Kn/s | knot per second, knots per second |
|
|
288
309
|
|
|
289
310
|
## 18. Angular velocity or rotational speed
|
|
290
311
|
|
|
@@ -292,18 +313,18 @@ These units are defined in `UnitMeasurements::AngularVelocity`.
|
|
|
292
313
|
|
|
293
314
|
| # | Name | Aliases |
|
|
294
315
|
|:--|:--|:--|
|
|
295
|
-
| _1_ | _rad/s_ |
|
|
296
|
-
| 2 | rad/min |
|
|
297
|
-
| 3 | rad/h |
|
|
298
|
-
| 4 | deg/s | °/s,
|
|
299
|
-
| 5 | deg/min | °/min,
|
|
300
|
-
| 6 | deg/h | °/h,
|
|
301
|
-
| 7 | rev/s |
|
|
302
|
-
| 8 | rev/min |
|
|
303
|
-
| 9 | rev/h |
|
|
304
|
-
| 10 | gon/s | ᵍ/s,
|
|
305
|
-
| 11 | gon/min | ᵍ/min,
|
|
306
|
-
| 12 | gon/h | ᵍ/h,
|
|
316
|
+
| _1_ | _rad/s_ | _radian per second, radians per second_ |
|
|
317
|
+
| 2 | rad/min | radian per minute, radians per minute |
|
|
318
|
+
| 3 | rad/h | radian per hour, radians per hour |
|
|
319
|
+
| 4 | deg/s | °/s, degree per second, degrees per second |
|
|
320
|
+
| 5 | deg/min | °/min, degree per minute, degrees per minute |
|
|
321
|
+
| 6 | deg/h | °/h, degree per hour, degrees per hour |
|
|
322
|
+
| 7 | rev/s | revolution per second, revolutions per second |
|
|
323
|
+
| 8 | rev/min | revolution per minute, revolutions per minute |
|
|
324
|
+
| 9 | rev/h | revolution per hour, revolutions per hour |
|
|
325
|
+
| 10 | gon/s | ᵍ/s, gradian per second, gradians per second |
|
|
326
|
+
| 11 | gon/min | ᵍ/min, gradian per minute, gradians per minute |
|
|
327
|
+
| 12 | gon/h | ᵍ/h, gradian per hour, gradians per hour |
|
|
307
328
|
|
|
308
329
|
## 19. Angular acceleration
|
|
309
330
|
|
|
@@ -311,9 +332,9 @@ These units are defined in `UnitMeasurements::AngularAcceleration`.
|
|
|
311
332
|
|
|
312
333
|
| # | Name | Aliases |
|
|
313
334
|
|:--|:--|:--|
|
|
314
|
-
| _1_ | _rad/s²_ | _rad/s^2,
|
|
315
|
-
| 2 | deg/s² | deg/s^2,
|
|
316
|
-
| 3 | gon/s² | gon/s^2,
|
|
335
|
+
| _1_ | _rad/s²_ | _rad/s^2, radian per second squared, radians per second squared_ |
|
|
336
|
+
| 2 | deg/s² | °/s², deg/s^2, degree per second squared, degrees per second squared |
|
|
337
|
+
| 3 | gon/s² | ᵍ/s², gon/s^2, gradian per second squared, gradians per second squared |
|
|
317
338
|
|
|
318
339
|
## 20. Electric potential or electromotive force
|
|
319
340
|
|
|
@@ -324,8 +345,8 @@ These units are defined in `UnitMeasurements::ElectricPotential`.
|
|
|
324
345
|
| _1_ | _V*_ | _volt, volts_ |
|
|
325
346
|
| 2 | abV | abvolt, abvolts |
|
|
326
347
|
| 3 | statV | statvolt, statvolts |
|
|
327
|
-
| 4 | W/A |
|
|
328
|
-
| 5 | J/C |
|
|
348
|
+
| 4 | W/A | watt per ampere, watts per ampere |
|
|
349
|
+
| 5 | J/C | joule per coulomb, joules per coulomb |
|
|
329
350
|
|
|
330
351
|
## 21. Electric charge
|
|
331
352
|
|
|
@@ -348,7 +369,7 @@ These units are defined in `UnitMeasurements::ElectricalCapacitance`.
|
|
|
348
369
|
| _1_ | _F*_ | _farad, farads_ |
|
|
349
370
|
| 2 | abF | abfarad, abfarads |
|
|
350
371
|
| 3 | statF | statfarad, statfarads |
|
|
351
|
-
| 4 | C/V |
|
|
372
|
+
| 4 | C/V | coulomb/volt, coulombs/volt, coulomb per volt, coulombs per volt |
|
|
352
373
|
|
|
353
374
|
## 23. Electrical elastance
|
|
354
375
|
|
|
@@ -357,7 +378,7 @@ These units are defined in `UnitMeasurements::ElectricalElastance`.
|
|
|
357
378
|
| # | Name | Aliases |
|
|
358
379
|
|:--|:--|:--|
|
|
359
380
|
| _1_ | _D*_ | _F⁻¹, daraf, darafs, reciprocal farad, reciprocal farads_ |
|
|
360
|
-
| 2 | V/C |
|
|
381
|
+
| 2 | V/C | volt/coulomb, volts/coulomb, volt per coulomb, volts per coulomb |
|
|
361
382
|
|
|
362
383
|
## 24. Electrical resistance or impedance
|
|
363
384
|
|
|
@@ -369,7 +390,7 @@ These units are defined in `UnitMeasurements::ElectricalResistance`.
|
|
|
369
390
|
| 2 | abΩ | abω, abohm, abohms |
|
|
370
391
|
| 3 | statΩ | statω, statohm, statohms |
|
|
371
392
|
| 4 | S | siemens, mho, mhos |
|
|
372
|
-
| 5 | V/A |
|
|
393
|
+
| 5 | V/A | volt/amp, volts/amp, volt/ampere, volts/ampere, volt per ampere, volts per ampere |
|
|
373
394
|
|
|
374
395
|
## 25. Electric conductance
|
|
375
396
|
|
|
@@ -380,7 +401,7 @@ These units are defined in `UnitMeasurements::ElectricConductance`.
|
|
|
380
401
|
| _1_ | _S*_ | _℧, Ω⁻¹, siemens, mho, mhos_ |
|
|
381
402
|
| 2 | abS | ab℧, absiemens, abmho, abmhos |
|
|
382
403
|
| 3 | statS | stat℧, statsiemens, statmho, statmhos |
|
|
383
|
-
| 3 | A/V |
|
|
404
|
+
| 3 | A/V | amp/volt, amps/volt, ampere/volt, amperes/volt, ampere per volt, amperes per volt |
|
|
384
405
|
|
|
385
406
|
## 26. Electrical inductance
|
|
386
407
|
|
|
@@ -391,7 +412,7 @@ These units are defined in `UnitMeasurements::ElectricalInductance`.
|
|
|
391
412
|
| _1_ | _H*_ | _henry, henries_ |
|
|
392
413
|
| 2 | abH | abhenry, abhenries |
|
|
393
414
|
| 3 | statH | stathenry, stathenries |
|
|
394
|
-
| 4 | Wb/A |
|
|
415
|
+
| 4 | Wb/A | weber per ampere, webers per ampere |
|
|
395
416
|
|
|
396
417
|
## 27. Magnetic flux
|
|
397
418
|
|
|
@@ -420,7 +441,7 @@ These units are defined in `UnitMeasurements::MagneticField`.
|
|
|
420
441
|
| # | Name | Aliases |
|
|
421
442
|
|:--|:--|:--|
|
|
422
443
|
| _1_ | _Oe*_ | _oersted, oersteds_ |
|
|
423
|
-
| 2 | A/m |
|
|
444
|
+
| 2 | A/m | ampere/meter, ampere/metre, amperes/meter, amperes/metre, ampere per meter, ampere per metre, amperes per meter, amperes per metre |
|
|
424
445
|
|
|
425
446
|
## 30. Catalytic activity
|
|
426
447
|
|
|
@@ -493,9 +514,9 @@ These units are defined in `UnitMeasurements::Illuminance`.
|
|
|
493
514
|
|
|
494
515
|
| # | Name | Aliases |
|
|
495
516
|
|:--|:--|:--|
|
|
496
|
-
| _1_ | _lx*_ | _lux, lm/m², lm/m^2,
|
|
497
|
-
| 2 | ph | phot, phots, lm/cm², lm/cm^2,
|
|
498
|
-
| 3 | fc | footcandle, lm/ft², lm/ft^2,
|
|
517
|
+
| _1_ | _lx*_ | _lux, lm/m², lm/m^2, lumen per square metre, lumen per square meter_ |
|
|
518
|
+
| 2 | ph | phot, phots, lm/cm², lm/cm^2, lumen per square centimetre, lumen per square centimeter |
|
|
519
|
+
| 3 | fc | footcandle, lm/ft², lm/ft^2, lumen per square foot |
|
|
499
520
|
| 4 | nx | nox |
|
|
500
521
|
|
|
501
522
|
## 37. Luminance
|
|
@@ -504,9 +525,9 @@ These units are defined in `UnitMeasurements::Luminance`.
|
|
|
504
525
|
|
|
505
526
|
| # | Name | Aliases |
|
|
506
527
|
|:--|:--|:--|
|
|
507
|
-
| _1_ | _cd/m²_ | _cd/m^2,
|
|
508
|
-
| 2 | cd/in² | cd/in^2,
|
|
509
|
-
| 3 | cd/ft² | cd/ft^2,
|
|
528
|
+
| _1_ | _cd/m²_ | _cd/m^2, candela per square metre, candelas per square metre, candela per square meter, candelas per square meter_ |
|
|
529
|
+
| 2 | cd/in² | cd/in^2, candela per square inch, candelas per square inch |
|
|
530
|
+
| 3 | cd/ft² | cd/ft^2, candela per square foot, candelas per square foot |
|
|
510
531
|
| 4 | fL | ft-L, foot lambert, foot-lambert |
|
|
511
532
|
| 5 | L | lambert, lamberts |
|
|
512
533
|
| 6 | sb | stlib |
|
|
@@ -518,9 +539,9 @@ These units are defined in `UnitMeasurements::Frequency`.
|
|
|
518
539
|
| # | Name | Aliases |
|
|
519
540
|
|:--|:--|:--|
|
|
520
541
|
| _1_ | _Hz*_ | _hertz, hertzes_ |
|
|
521
|
-
| 2 | rad/s |
|
|
522
|
-
| 3 | deg/s | °/s,
|
|
523
|
-
| 4 | rev/s | rps,
|
|
542
|
+
| 2 | rad/s | radian per second, radians per second |
|
|
543
|
+
| 3 | deg/s | °/s, degree per second, degrees per second |
|
|
544
|
+
| 4 | rev/s | rps, revolution per second, revolutions per second |
|
|
524
545
|
|
|
525
546
|
## 39. Power or heat flow rate
|
|
526
547
|
|
|
@@ -531,8 +552,8 @@ These units are defined in `UnitMeasurements::Power`.
|
|
|
531
552
|
| _1_ | _W*_ | _watt, watts_ |
|
|
532
553
|
| 2 | hp (M) | PS, metric horsepower |
|
|
533
554
|
| 3 | hp | hp (I), horsepower |
|
|
534
|
-
| 4 | erg/s | erg
|
|
535
|
-
| 5 | cal/s |
|
|
555
|
+
| 4 | erg/s | erg per second, ergs per second |
|
|
556
|
+
| 5 | cal/s | calorie per second, calories per second |
|
|
536
557
|
|
|
537
558
|
## 40. Energy
|
|
538
559
|
|
|
@@ -557,8 +578,8 @@ These units are defined in `UnitMeasurements::DynamicViscosity`.
|
|
|
557
578
|
|:--|:--|:--|
|
|
558
579
|
| _1_ | _Pa⋅s*_ | _Pa*s, pascal second_ |
|
|
559
580
|
| 2 | P | dyne·s/cm², dyne*s/cm^2, poise |
|
|
560
|
-
| 3 | lb/(ft⋅s) | lb/(ft*s), pound per foot second |
|
|
561
|
-
| 4 | lb/(ft⋅h) | lb/(ft*h), pound per foot hour |
|
|
581
|
+
| 3 | lb/(ft⋅s) | lb/(ft*s), pound per foot second, pounds per foot second |
|
|
582
|
+
| 4 | lb/(ft⋅h) | lb/(ft*h), pound per foot hour, pounds per foot hour |
|
|
562
583
|
| 5 | (lbf⋅s)/ft² | (lb⋅s)/ft², (lbf\*s)/ft^2, (lb\*s)/ft^2, pound-force second per square foot |
|
|
563
584
|
| 6 | (lbf⋅s)/in² | (lb⋅s)/in², (lbf\*s)/in^2, (lb\*s)/in^2, pound-force second per square inch |
|
|
564
585
|
| 7 | Pl | poiseuille |
|
|
@@ -570,7 +591,7 @@ These units are defined in `UnitMeasurements::KineticViscosity`.
|
|
|
570
591
|
| # | Name | Aliases |
|
|
571
592
|
|:--|:--|:--|
|
|
572
593
|
| _1_ | _m²/s_ | _m^2/s, square metre per second, square meter per second, square metres per second, square meters per second_ |
|
|
573
|
-
| 2 | St | strokes |
|
|
594
|
+
| 2 | St | stoke, strokes |
|
|
574
595
|
| 3 | ft²/s | ft^2/s, square foot per second, square feet per second |
|
|
575
596
|
| 4 | in²/s | in^2/s, square inch per second, square inches per second |
|
|
576
597
|
|
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.6.1
|
|
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
|
+
date: 2023-11-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|