Skip to content

Commit 44f8b73

Browse files
tmilnthorpangularsen
authored andcommitted
Adding BaseUnits for a handful of quantities (#625)
1 parent 3ecea2a commit 44f8b73

12 files changed

+112
-24
lines changed

Common/UnitDefinitions/AreaDensity.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
{
1111
"SingularName": "KilogramPerSquareMeter",
1212
"PluralName": "KilogramsPerSquareMeter",
13+
"BaseUnits": {
14+
"L": "Meter",
15+
"M": "Kilogram"
16+
},
1317
"FromUnitToBaseFunc": "x",
1418
"FromBaseToUnitFunc": "x",
1519
"Localization": [

Common/UnitDefinitions/AreaMomentOfInertia.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
{
1010
"SingularName": "MeterToTheFourth",
1111
"PluralName": "MetersToTheFourth",
12+
"BaseUnits": {
13+
"L": "Meter"
14+
},
1215
"FromUnitToBaseFunc": "x",
1316
"FromBaseToUnitFunc": "x",
1417
"Localization": [
@@ -21,6 +24,9 @@
2124
{
2225
"SingularName": "DecimeterToTheFourth",
2326
"PluralName": "DecimetersToTheFourth",
27+
"BaseUnits": {
28+
"L": "Decimeter"
29+
},
2430
"FromUnitToBaseFunc": "x/1e4",
2531
"FromBaseToUnitFunc": "x*1e4",
2632
"Localization": [
@@ -33,6 +39,9 @@
3339
{
3440
"SingularName": "CentimeterToTheFourth",
3541
"PluralName": "CentimetersToTheFourth",
42+
"BaseUnits": {
43+
"L": "Centimeter"
44+
},
3645
"FromUnitToBaseFunc": "x/1e8",
3746
"FromBaseToUnitFunc": "x*1e8",
3847
"Localization": [
@@ -45,6 +54,9 @@
4554
{
4655
"SingularName": "MillimeterToTheFourth",
4756
"PluralName": "MillimetersToTheFourth",
57+
"BaseUnits": {
58+
"L": "Millimeter"
59+
},
4860
"FromUnitToBaseFunc": "x/1e12",
4961
"FromBaseToUnitFunc": "x*1e12",
5062
"Localization": [
@@ -57,6 +69,9 @@
5769
{
5870
"SingularName": "FootToTheFourth",
5971
"PluralName": "FeetToTheFourth",
72+
"BaseUnits": {
73+
"L": "Foot"
74+
},
6075
"FromUnitToBaseFunc": "x*Math.Pow(0.3048, 4)",
6176
"FromBaseToUnitFunc": "x/Math.Pow(0.3048, 4)",
6277
"Localization": [
@@ -69,6 +84,9 @@
6984
{
7085
"SingularName": "InchToTheFourth",
7186
"PluralName": "InchesToTheFourth",
87+
"BaseUnits": {
88+
"L": "Inch"
89+
},
7290
"FromUnitToBaseFunc": "x*Math.Pow(2.54e-2, 4)",
7391
"FromBaseToUnitFunc": "x/Math.Pow(2.54e-2, 4)",
7492
"Localization": [

Common/UnitDefinitions/Capacitance.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@
1313
{
1414
"SingularName": "Farad",
1515
"PluralName": "Farads",
16+
"BaseUnits": {
17+
"L": "Meter",
18+
"M": "Kilogram",
19+
"T": "Second",
20+
"I": "Ampere"
21+
},
1622
"FromUnitToBaseFunc": "x",
1723
"FromBaseToUnitFunc": "x",
1824
"Prefixes": [ "Pico", "Nano", "Micro", "Milli", "Kilo", "Mega" ],

Common/UnitDefinitions/CoefficientOfThermalExpansion.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
{
1010
"SingularName": "InverseKelvin",
1111
"PluralName": "InverseKelvin",
12+
"BaseUnits": {
13+
"Θ": "Kelvin"
14+
},
1215
"FromUnitToBaseFunc": "x",
1316
"FromBaseToUnitFunc": "x",
1417
"Localization": [
@@ -21,6 +24,9 @@
2124
{
2225
"SingularName": "InverseDegreeCelsius",
2326
"PluralName": "InverseDegreeCelsius",
27+
"BaseUnits": {
28+
"Θ": "DegreeCelsius"
29+
},
2430
"FromUnitToBaseFunc": "x",
2531
"FromBaseToUnitFunc": "x",
2632
"Localization": [
@@ -33,6 +39,9 @@
3339
{
3440
"SingularName": "InverseDegreeFahrenheit",
3541
"PluralName": "InverseDegreeFahrenheit",
42+
"BaseUnits": {
43+
"Θ": "DegreeFahrenheit"
44+
},
3645
"FromUnitToBaseFunc": "x*5/9",
3746
"FromBaseToUnitFunc": "x*9/5",
3847
"Localization": [

Common/UnitDefinitions/Density.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
{
1212
"SingularName": "GramPerCubicMillimeter",
1313
"PluralName": "GramsPerCubicMillimeter",
14+
"BaseUnits": {
15+
"L": "Millimeter",
16+
"M": "Gram"
17+
},
1418
"FromUnitToBaseFunc": "x/1e-6",
1519
"FromBaseToUnitFunc": "x*1e-6",
1620
"Prefixes": [ "Kilo" ],
@@ -24,6 +28,10 @@
2428
{
2529
"SingularName": "GramPerCubicCentimeter",
2630
"PluralName": "GramsPerCubicCentimeter",
31+
"BaseUnits": {
32+
"L": "Centimeter",
33+
"M": "Gram"
34+
},
2735
"FromUnitToBaseFunc": "x/1e-3",
2836
"FromBaseToUnitFunc": "x*1e-3",
2937
"Prefixes": [ "Kilo" ],
@@ -37,6 +45,10 @@
3745
{
3846
"SingularName": "GramPerCubicMeter",
3947
"PluralName": "GramsPerCubicMeter",
48+
"BaseUnits": {
49+
"L": "Meter",
50+
"M": "Gram"
51+
},
4052
"FromUnitToBaseFunc": "x/1e3",
4153
"FromBaseToUnitFunc": "x*1e3",
4254
"Prefixes": [ "Kilo", "Milli", "Micro" ],
@@ -54,6 +66,10 @@
5466
{
5567
"SingularName": "PoundPerCubicInch",
5668
"PluralName": "PoundsPerCubicInch",
69+
"BaseUnits": {
70+
"L": "Inch",
71+
"M": "Pound"
72+
},
5773
"FromUnitToBaseFunc": "x/3.6127298147753e-5",
5874
"FromBaseToUnitFunc": "x*3.6127298147753e-5",
5975
"Prefixes": [ "Kilo" ],
@@ -68,6 +84,10 @@
6884
{
6985
"SingularName": "PoundPerCubicFoot",
7086
"PluralName": "PoundsPerCubicFoot",
87+
"BaseUnits": {
88+
"L": "Foot",
89+
"M": "Pound"
90+
},
7191
"FromUnitToBaseFunc": "x/0.062427961",
7292
"FromBaseToUnitFunc": "x*0.062427961",
7393
"Prefixes": [ "Kilo" ],
@@ -82,6 +102,10 @@
82102
{
83103
"SingularName": "TonnePerCubicMillimeter",
84104
"PluralName": "TonnesPerCubicMillimeter",
105+
"BaseUnits": {
106+
"L": "Millimeter",
107+
"M": "Tonne"
108+
},
85109
"FromUnitToBaseFunc": "x/1e-12",
86110
"FromBaseToUnitFunc": "x*1e-12",
87111
"Localization": [
@@ -94,6 +118,10 @@
94118
{
95119
"SingularName": "TonnePerCubicCentimeter",
96120
"PluralName": "TonnesPerCubicCentimeter",
121+
"BaseUnits": {
122+
"L": "Centimeter",
123+
"M": "Tonne"
124+
},
97125
"FromUnitToBaseFunc": "x/1e-9",
98126
"FromBaseToUnitFunc": "x*1e-9",
99127
"Localization": [
@@ -106,6 +134,10 @@
106134
{
107135
"SingularName": "TonnePerCubicMeter",
108136
"PluralName": "TonnesPerCubicMeter",
137+
"BaseUnits": {
138+
"L": "Meter",
139+
"M": "Tonne"
140+
},
109141
"FromUnitToBaseFunc": "x/0.001",
110142
"FromBaseToUnitFunc": "x*0.001",
111143
"Localization": [
@@ -118,6 +150,10 @@
118150
{
119151
"SingularName": "SlugPerCubicFoot",
120152
"PluralName": "SlugsPerCubicFoot",
153+
"BaseUnits": {
154+
"L": "Foot",
155+
"M": "Slug"
156+
},
121157
"FromUnitToBaseFunc": "x*515.378818",
122158
"FromBaseToUnitFunc": "x*0.00194032033",
123159
"Localization": [

Common/UnitDefinitions/Force.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"Name": "Force",
33
"BaseUnit": "Newton",
44
"XmlDoc": "In physics, a force is any influence that causes an object to undergo a certain change, either concerning its movement, direction, or geometrical construction. In other words, a force can cause an object with mass to change its velocity (which includes to begin moving from a state of rest), i.e., to accelerate, or a flexible object to deform, or both. Force can also be described by intuitive concepts such as a push or a pull. A force has both magnitude and direction, making it a vector quantity. It is measured in the SI unit of newtons and represented by the symbol F.",
@@ -11,6 +11,11 @@
1111
{
1212
"SingularName": "Dyn",
1313
"PluralName": "Dyne",
14+
"BaseUnits": {
15+
"L": "Centimeter",
16+
"M": "Gram",
17+
"T": "Second"
18+
},
1419
"FromUnitToBaseFunc": "x/1e5",
1520
"FromBaseToUnitFunc": "x*1e5",
1621
"Localization": [
@@ -59,6 +64,11 @@
5964
{
6065
"SingularName": "Newton",
6166
"PluralName": "Newtons",
67+
"BaseUnits": {
68+
"L": "Meter",
69+
"M": "Kilogram",
70+
"T": "Second"
71+
},
6272
"FromUnitToBaseFunc": "x",
6373
"FromBaseToUnitFunc": "x",
6474
"Prefixes": [ "Micro", "Milli", "Deca", "Kilo", "Mega" ],
@@ -93,6 +103,11 @@
93103
{
94104
"SingularName": "Poundal",
95105
"PluralName": "Poundals",
106+
"BaseUnits": {
107+
"L": "Foot",
108+
"M": "Pound",
109+
"T": "Second"
110+
},
96111
"FromUnitToBaseFunc": "x*0.13825502798973041652092282466083",
97112
"FromBaseToUnitFunc": "x/0.13825502798973041652092282466083",
98113
"Localization": [

UnitsNet/GeneratedCode/Quantities/AreaDensity.NetFramework.g.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet/GeneratedCode/Quantities/AreaMomentOfInertia.NetFramework.g.cs

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet/GeneratedCode/Quantities/Capacitance.NetFramework.g.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UnitsNet/GeneratedCode/Quantities/CoefficientOfThermalExpansion.NetFramework.g.cs

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)