Skip to content

Commit 7b742aa

Browse files
authored
Add units to ForceChangeRate, PressureChangeRate, fix abbreviations (#914)
Add new units: - ForceChangeRate: PoundForcePerMinute and PoundForcePerSecond - PressureChangeRate: PoundForcePerSquareInchPerSecond and PoundForcePerSquareInchPerMinute Add new abbreviations: - Pressure: PoundForcePerSquareInch (ksi) Fixed translation: - PressureChangeRate : Russians abbreviations for units per minutes
1 parent d752c42 commit 7b742aa

27 files changed

+777
-66
lines changed

Common/UnitDefinitions/Force.json

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,17 @@
125125
"PluralName": "PoundsForce",
126126
"FromUnitToBaseFunc": "x*4.4482216152605095551842641431421",
127127
"FromBaseToUnitFunc": "x/4.4482216152605095551842641431421",
128+
"Prefixes": [ "Kilo" ],
128129
"Localization": [
129130
{
130131
"Culture": "en-US",
131-
"Abbreviations": [ "lbf" ]
132+
"Abbreviations": [ "lbf" ],
133+
"AbbreviationsForPrefixes": { "Kilo": [ "kipf", "kip", "k" ] }
132134
},
133135
{
134136
"Culture": "ru-RU",
135-
"Abbreviations": [ "фунт-сила" ]
137+
"Abbreviations": [ "фунт-сила" ],
138+
"AbbreviationsForPrefixes": { "Kilo": [ "кипф", "койка", "К" ] }
136139
}
137140
]
138141
},
@@ -148,22 +151,6 @@
148151
}
149152
]
150153
},
151-
{
152-
"SingularName": "KilopoundForce",
153-
"PluralName": "KilopoundsForce",
154-
"FromUnitToBaseFunc": "x*4448.2216152605095551842641431421",
155-
"FromBaseToUnitFunc": "x/4448.2216152605095551842641431421",
156-
"Localization": [
157-
{
158-
"Culture": "en-US",
159-
"Abbreviations": [ "kipf", "kip", "k" ]
160-
},
161-
{
162-
"Culture": "ru-RU",
163-
"Abbreviations": [ "кипф", "койка", "К" ]
164-
}
165-
]
166-
},
167154
{
168155
"SingularName": "ShortTonForce",
169156
"PluralName": "ShortTonsForce",

Common/UnitDefinitions/ForceChangeRate.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,34 @@
3333
"Abbreviations": [ "N/s" ]
3434
}
3535
]
36+
},
37+
{
38+
"SingularName": "PoundForcePerMinute",
39+
"PluralName": "PoundsForcePerMinute",
40+
"FromUnitToBaseFunc": "x*4.4482216152605095551842641431421/60",
41+
"FromBaseToUnitFunc": "x/4.4482216152605095551842641431421*60",
42+
"Prefixes": [ "Kilo" ],
43+
"Localization": [
44+
{
45+
"Culture": "en-US",
46+
"Abbreviations": [ "lbf/min" ],
47+
"AbbreviationsForPrefixes": { "Kilo": [ "kipf/min", "kip/min", "k/min" ] }
48+
}
49+
]
50+
},
51+
{
52+
"SingularName": "PoundForcePerSecond",
53+
"PluralName": "PoundsForcePerSecond",
54+
"FromUnitToBaseFunc": "x*4.4482216152605095551842641431421",
55+
"FromBaseToUnitFunc": "x/4.4482216152605095551842641431421",
56+
"Prefixes": [ "Kilo" ],
57+
"Localization": [
58+
{
59+
"Culture": "en-US",
60+
"Abbreviations": [ "lbf/s" ],
61+
"AbbreviationsForPrefixes": { "Kilo": [ "kipf/s", "kip/s", "k/s" ] }
62+
}
63+
]
3664
}
3765
]
3866
}

Common/UnitDefinitions/Pressure.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,12 @@
204204
{
205205
"Culture": "en-US",
206206
"Abbreviations": [ "psi", "lb/in²" ],
207-
"AbbreviationsForPrefixes": { "Kilo": "kipf/in²" }
207+
"AbbreviationsForPrefixes": { "Kilo": [ "ksi", "kipf/in²" ]}
208208
},
209209
{
210210
"Culture": "ru-RU",
211211
"Abbreviations": [ "psi", "lb/in²" ],
212-
"AbbreviationsForPrefixes": { "Kilo": "kipf/in²" }
212+
"AbbreviationsForPrefixes": { "Kilo": [ "ksi", "kipf/in²" ]}
213213
}
214214
]
215215
},

Common/UnitDefinitions/PressureChangeRate.json

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
},
3939
{
4040
"Culture": "ru-RU",
41-
"Abbreviations": [ "Па/с" ]
41+
"Abbreviations": [ "Па/мин" ]
4242
}
4343
]
4444
},
@@ -57,6 +57,44 @@
5757
"Abbreviations": [ "атм/с" ]
5858
}
5959
]
60+
},
61+
{
62+
"SingularName": "PoundForcePerSquareInchPerSecond",
63+
"PluralName": "PoundsForcePerSquareInchPerSecond",
64+
"FromUnitToBaseFunc": "x*6.894757293168361e3",
65+
"FromBaseToUnitFunc": "x/6.894757293168361e3",
66+
"Prefixes": [ "Kilo", "Mega" ],
67+
"Localization": [
68+
{
69+
"Culture": "en-US",
70+
"Abbreviations": [ "psi/s", "lb/in²/s" ],
71+
"AbbreviationsForPrefixes": { "Kilo": [ "ksi/s", "kipf/in²/s" ]}
72+
},
73+
{
74+
"Culture": "ru-RU",
75+
"Abbreviations": [ "psi/с", "lb/in²/с" ],
76+
"AbbreviationsForPrefixes": { "Kilo": [ "ksi/с", "kipf/in²/с" ]}
77+
}
78+
]
79+
},
80+
{
81+
"SingularName": "PoundForcePerSquareInchPerMinute",
82+
"PluralName": "PoundsForcePerSquareInchPerMinute",
83+
"FromUnitToBaseFunc": "x*6.894757293168361e3/60",
84+
"FromBaseToUnitFunc": "x/6.894757293168361e3*60",
85+
"Prefixes": [ "Kilo", "Mega" ],
86+
"Localization": [
87+
{
88+
"Culture": "en-US",
89+
"Abbreviations": [ "psi/min", "lb/in²/min" ],
90+
"AbbreviationsForPrefixes": { "Kilo": [ "ksi/min", "kipf/in²/min" ]}
91+
},
92+
{
93+
"Culture": "ru-RU",
94+
"Abbreviations": [ "psi/мин", "lb/in²/мин" ],
95+
"AbbreviationsForPrefixes": { "Kilo": [ "ksi/мин", "kipf/in²/мин" ]}
96+
}
97+
]
6098
}
6199
]
62100
}

UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToForceChangeRateExtensionsTest.g.cs

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

UnitsNet.NumberExtensions.Tests/GeneratedCode/NumberToPressureChangeRateExtensionsTest.g.cs

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

UnitsNet.NumberExtensions/GeneratedCode/NumberToForceChangeRateExtensions.g.cs

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

UnitsNet.NumberExtensions/GeneratedCode/NumberToPressureChangeRateExtensions.g.cs

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

UnitsNet.Tests/CustomCode/ForceChangeRateTests.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ public class ForceChangeRateTests : ForceChangeRateTestsBase
1010
protected override double DecanewtonsPerMinuteInOneNewtonPerSecond => 6;
1111
protected override double KilonewtonsPerMinuteInOneNewtonPerSecond => 0.06;
1212
protected override double KilonewtonsPerSecondInOneNewtonPerSecond => 1E-3;
13+
protected override double KilopoundsForcePerMinuteInOneNewtonPerSecond => 0.22481e-3*60;
14+
protected override double KilopoundsForcePerSecondInOneNewtonPerSecond => 0.22481e-3;
1315
protected override double DecanewtonsPerSecondInOneNewtonPerSecond => 1E-1;
1416
protected override double NewtonsPerSecondInOneNewtonPerSecond => 1;
17+
protected override double PoundsForcePerMinuteInOneNewtonPerSecond => 0.22481 * 60;
18+
protected override double PoundsForcePerSecondInOneNewtonPerSecond => 0.22481;
1519
protected override double DecinewtonsPerSecondInOneNewtonPerSecond => 1E1;
1620
protected override double CentinewtonsPerSecondInOneNewtonPerSecond => 1E2;
1721
protected override double MillinewtonsPerSecondInOneNewtonPerSecond => 1E3;

UnitsNet.Tests/CustomCode/PressureChangeRateTests.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,22 @@ public class PressureChangeRateTests : PressureChangeRateTestsBase
1010

1111
protected override double KilopascalsPerSecondInOnePascalPerSecond => 1e-3;
1212

13+
protected override double KilopoundsForcePerSquareInchPerMinuteInOnePascalPerSecond => 1.450377377302092e-7 * 60;
14+
15+
protected override double KilopoundsForcePerSquareInchPerSecondInOnePascalPerSecond => 1.450377377302092e-7;
16+
1317
protected override double MegapascalsPerSecondInOnePascalPerSecond => 1E-6;
1418

19+
protected override double MegapoundsForcePerSquareInchPerMinuteInOnePascalPerSecond => 1.450377377302092e-10 * 60;
20+
21+
protected override double MegapoundsForcePerSquareInchPerSecondInOnePascalPerSecond => 1.450377377302092e-10;
22+
1523
protected override double PascalsPerSecondInOnePascalPerSecond => 1;
1624

25+
protected override double PoundsForcePerSquareInchPerMinuteInOnePascalPerSecond => 1.450377377302092e-4 * 60;
26+
27+
protected override double PoundsForcePerSquareInchPerSecondInOnePascalPerSecond => 1.450377377302092e-4;
28+
1729
protected override double MegapascalsPerMinuteInOnePascalPerSecond => 6e-5;
1830

1931
protected override double KilopascalsPerMinuteInOnePascalPerSecond => 6e-2;

0 commit comments

Comments
 (0)