Skip to content

Commit 4630593

Browse files
authored
✨Define base units for Pressure, PressureChangeRate (#1285)
1 parent 8ddaf50 commit 4630593

File tree

5 files changed

+67
-12
lines changed

5 files changed

+67
-12
lines changed

Common/UnitDefinitions/Pressure.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@
8282
{
8383
"SingularName": "KilogramForcePerSquareCentimeter",
8484
"PluralName": "KilogramsForcePerSquareCentimeter",
85+
"BaseUnits": {
86+
"L": "Centimeter",
87+
"M": "Kilogram",
88+
"T": "Second"
89+
},
8590
"FromUnitToBaseFunc": "{x} * 9.80665e4",
8691
"FromBaseToUnitFunc": "{x} / 9.80665e4",
8792
"Localization": [
@@ -197,6 +202,11 @@
197202
{
198203
"SingularName": "PoundForcePerSquareInch",
199204
"PluralName": "PoundsForcePerSquareInch",
205+
"BaseUnits": {
206+
"L": "Inch",
207+
"M": "Pound",
208+
"T": "Second"
209+
},
200210
"FromUnitToBaseFunc": "{x} * 6.894757293168361e3",
201211
"FromBaseToUnitFunc": "{x} / 6.894757293168361e3",
202212
"Prefixes": [ "Kilo" ],
@@ -216,6 +226,11 @@
216226
{
217227
"SingularName": "PoundForcePerSquareMil",
218228
"PluralName": "PoundsForcePerSquareMil",
229+
"BaseUnits": {
230+
"L": "Mil",
231+
"M": "Pound",
232+
"T": "Second"
233+
},
219234
"FromUnitToBaseFunc": "{x} * 6.894757293168361e9",
220235
"FromBaseToUnitFunc": "{x} / 6.894757293168361e9",
221236
"Prefixes": [ "Kilo" ],
@@ -230,6 +245,11 @@
230245
{
231246
"SingularName": "PoundForcePerSquareFoot",
232247
"PluralName": "PoundsForcePerSquareFoot",
248+
"BaseUnits": {
249+
"L": "Foot",
250+
"M": "Pound",
251+
"T": "Second"
252+
},
233253
"FromUnitToBaseFunc": "{x} * 4.788025898033584e1",
234254
"FromBaseToUnitFunc": "{x} / 4.788025898033584e1",
235255
"Prefixes": [ "Kilo" ],
@@ -244,6 +264,11 @@
244264
{
245265
"SingularName": "TonneForcePerSquareMillimeter",
246266
"PluralName": "TonnesForcePerSquareMillimeter",
267+
"BaseUnits": {
268+
"L": "Millimeter",
269+
"M": "Tonne",
270+
"T": "Second"
271+
},
247272
"FromUnitToBaseFunc": "{x} * 9.80665e9",
248273
"FromBaseToUnitFunc": "{x} / 9.80665e9",
249274
"Localization": [
@@ -256,6 +281,11 @@
256281
{
257282
"SingularName": "TonneForcePerSquareMeter",
258283
"PluralName": "TonnesForcePerSquareMeter",
284+
"BaseUnits": {
285+
"L": "Meter",
286+
"M": "Tonne",
287+
"T": "Second"
288+
},
259289
"FromUnitToBaseFunc": "{x} * 9.80665e3",
260290
"FromBaseToUnitFunc": "{x} / 9.80665e3",
261291
"Localization": [
@@ -280,6 +310,11 @@
280310
{
281311
"SingularName": "TonneForcePerSquareCentimeter",
282312
"PluralName": "TonnesForcePerSquareCentimeter",
313+
"BaseUnits": {
314+
"L": "Centimeter",
315+
"M": "Tonne",
316+
"T": "Second"
317+
},
283318
"FromUnitToBaseFunc": "{x} * 9.80665e7",
284319
"FromBaseToUnitFunc": "{x} / 9.80665e7",
285320
"Localization": [

Common/UnitDefinitions/PressureChangeRate.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
{
1212
"SingularName": "PascalPerSecond",
1313
"PluralName": "PascalsPerSecond",
14+
"BaseUnits": {
15+
"L": "Meter",
16+
"M": "Kilogram",
17+
"T": "Second"
18+
},
1419
"FromUnitToBaseFunc": "{x}",
1520
"FromBaseToUnitFunc": "{x}",
1621
"Prefixes": [ "Kilo", "Mega" ],
@@ -28,6 +33,11 @@
2833
{
2934
"SingularName": "PascalPerMinute",
3035
"PluralName": "PascalsPerMinute",
36+
"BaseUnits": {
37+
"L": "Meter",
38+
"M": "Kilogram",
39+
"T": "Minute"
40+
},
3141
"FromUnitToBaseFunc": "{x} / 60",
3242
"FromBaseToUnitFunc": "{x} * 60",
3343
"Prefixes": [ "Kilo", "Mega" ],
@@ -77,6 +87,11 @@
7787
{
7888
"SingularName": "PoundForcePerSquareInchPerSecond",
7989
"PluralName": "PoundsForcePerSquareInchPerSecond",
90+
"BaseUnits": {
91+
"L": "Inch",
92+
"M": "Pound",
93+
"T": "Second"
94+
},
8095
"FromUnitToBaseFunc": "{x} * 6.894757293168361e3",
8196
"FromBaseToUnitFunc": "{x} / 6.894757293168361e3",
8297
"Prefixes": [ "Kilo", "Mega" ],
@@ -96,6 +111,11 @@
96111
{
97112
"SingularName": "PoundForcePerSquareInchPerMinute",
98113
"PluralName": "PoundsForcePerSquareInchPerMinute",
114+
"BaseUnits": {
115+
"L": "Inch",
116+
"M": "Pound",
117+
"T": "Minute"
118+
},
99119
"FromUnitToBaseFunc": "{x} * 6.894757293168361e3 / 60",
100120
"FromBaseToUnitFunc": "{x} / 6.894757293168361e3 * 60",
101121
"Prefixes": [ "Kilo", "Mega" ],

UnitsNet.Tests/CustomCode/PressureChangeRateTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace UnitsNet.Tests
99
{
1010
public class PressureChangeRateTests : PressureChangeRateTestsBase
1111
{
12-
protected override bool SupportsSIUnitSystem => false;
12+
protected override bool SupportsSIUnitSystem => true;
1313
protected override double AtmospheresPerSecondInOnePascalPerSecond => 9.8692 * 1E-6;
1414

1515
protected override double KilopascalsPerSecondInOnePascalPerSecond => 1e-3;

UnitsNet/GeneratedCode/Quantities/Pressure.g.cs

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

UnitsNet/GeneratedCode/Quantities/PressureChangeRate.g.cs

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

0 commit comments

Comments
 (0)