Skip to content

Commit

Permalink
Add water column pressure units (#1220)
Browse files Browse the repository at this point in the history
CentimeterOfWaterColumn
MeterOfWaterColumn
  • Loading branch information
t03apt authored Mar 7, 2023
1 parent b893c43 commit adcb8e2
Show file tree
Hide file tree
Showing 10 changed files with 528 additions and 167 deletions.
11 changes: 6 additions & 5 deletions Common/UnitDefinitions/Pressure.json
Original file line number Diff line number Diff line change
Expand Up @@ -354,14 +354,15 @@
]
},
{
"SingularName": "MillimeterOfWaterColumn",
"PluralName": "MillimeterOfWaterColumn",
"FromUnitToBaseFunc": "{x} * 9.806650000000272e0",
"FromBaseToUnitFunc": "{x} / 9.806650000000272e0",
"SingularName": "MeterOfWaterColumn",
"PluralName": "MetersOfWaterColumn",
"FromUnitToBaseFunc": "{x} * 9.806650000000272e3",
"FromBaseToUnitFunc": "{x} / 9.806650000000272e3",
"Prefixes": [ "Milli", "Centi" ],
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "mmH2O", "mm wc" ]
"Abbreviations": [ "mH₂O", "mH2O", "m wc", "m wg" ]
}
]
},
Expand Down
4 changes: 3 additions & 1 deletion Common/UnitEnumValues.g.json
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,9 @@
"TonneForcePerSquareCentimeter": 44,
"TonneForcePerSquareMeter": 45,
"TonneForcePerSquareMillimeter": 46,
"Torr": 47
"Torr": 47,
"MeterOfWaterColumn": 57,
"CentimeterOfWaterColumn": 48
},
"PressureChangeRate": {
"AtmospherePerSecond": 1,
Expand Down
34 changes: 30 additions & 4 deletions UnitsNet.NanoFramework/GeneratedCode/Quantities/Pressure.g.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions UnitsNet.NanoFramework/GeneratedCode/Units/PressureUnit.g.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion UnitsNet.Tests/CustomCode/PressureTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ public class PressureTests : PressureTestsBase

protected override double MillimetersOfMercuryInOnePascal => 7.50061561302643e-3;

protected override double MillimeterOfWaterColumnInOnePascal => 1.0197162129779283e-1;
protected override double MetersOfWaterColumnInOnePascal => 1.0197162129779283e-4;

protected override double CentimetersOfWaterColumnInOnePascal => 1.0197162129779283e-2;

protected override double MillimetersOfWaterColumnInOnePascal => 1.0197162129779283e-1;

protected override double InchesOfMercuryInOnePascal => 2.95299830714159e-4;

Expand Down
Loading

0 comments on commit adcb8e2

Please sign in to comment.