57
57
import org .openhab .core .library .dimension .ElectricConductivity ;
58
58
import org .openhab .core .library .dimension .EmissionIntensity ;
59
59
import org .openhab .core .library .dimension .Intensity ;
60
+ import org .openhab .core .library .dimension .RadiantExposure ;
60
61
import org .openhab .core .library .dimension .RadiationSpecificActivity ;
61
62
import org .openhab .core .library .dimension .VolumetricFlowRate ;
62
63
@@ -91,13 +92,15 @@ public final class Units extends CustomUnits {
91
92
public static final Unit <AmountOfSubstance > MOLE = addUnit (tech .units .indriya .unit .Units .MOLE );
92
93
public static final Unit <Volume > LITRE = addUnit (tech .units .indriya .unit .Units .LITRE );
93
94
@ SuppressWarnings ("unchecked" )
94
- public static final Unit <AmountOfSubstance > DEUTSCHE_HAERTE = addUnit (new TransformedUnit <>("°dH" ,
95
- ( Unit < AmountOfSubstance >) MetricPrefix .MILLI (Units .MOLE ).divide (Units .LITRE ), MultiplyConverter .of (5.6 )));
95
+ public static final Unit <Dimensionless > DEUTSCHE_HAERTE = addUnit (( Unit < Dimensionless >) new TransformedUnit <>("°dH" ,
96
+ MetricPrefix .MILLI (Units .MOLE ).divide (Units .LITRE ), MultiplyConverter .of (0.17833 )));
96
97
public static final Unit <Angle > DEGREE_ANGLE = addUnit (NonSI .DEGREE_ANGLE );
97
98
public static final Unit <Angle > RADIAN = addUnit (tech .units .indriya .unit .Units .RADIAN );
98
99
public static final Unit <ArealDensity > DOBSON_UNIT = addUnit (
99
100
new ProductUnit <>(MetricPrefix .MILLI (tech .units .indriya .unit .Units .MOLE ).multiply (0.4462 )
100
101
.divide (tech .units .indriya .unit .Units .SQUARE_METRE )));
102
+ public static final Unit <ArealDensity > KILOGRAM_PER_SQUARE_METRE = addUnit (new ProductUnit <>(
103
+ tech .units .indriya .unit .Units .KILOGRAM .divide (tech .units .indriya .unit .Units .SQUARE_METRE )));
101
104
public static final Unit <CatalyticActivity > KATAL = addUnit (tech .units .indriya .unit .Units .KATAL );
102
105
public static final Unit <Density > KILOGRAM_PER_CUBICMETRE = addUnit (new ProductUnit <>(
103
106
tech .units .indriya .unit .Units .KILOGRAM .divide (tech .units .indriya .unit .Units .CUBIC_METRE )));
@@ -187,6 +190,10 @@ public final class Units extends CustomUnits {
187
190
new TransformedUnit <>("kn" , tech .units .indriya .unit .Units .KILOMETRE_PER_HOUR ,
188
191
MultiplyConverter .ofRational (BigInteger .valueOf (1852 ), BigInteger .valueOf (1000 ))));
189
192
public static final Unit <SolidAngle > STERADIAN = addUnit (tech .units .indriya .unit .Units .STERADIAN );
193
+ public static final Unit <RadiantExposure > WATT_HOUR_PER_SQUARE_METRE = addUnit (
194
+ new ProductUnit <>(WATT_HOUR .divide (tech .units .indriya .unit .Units .SQUARE_METRE )));
195
+ public static final Unit <RadiantExposure > JOULE_PER_SQUARE_METRE = addUnit (
196
+ new ProductUnit <>(JOULE .divide (tech .units .indriya .unit .Units .SQUARE_METRE )));
190
197
public static final Unit <Temperature > KELVIN = addUnit (tech .units .indriya .unit .Units .KELVIN );
191
198
public static final Unit <?> MIRED = addUnit (MetricPrefix .MEGA (tech .units .indriya .unit .Units .KELVIN ).inverse ());
192
199
public static final Unit <Time > SECOND = addUnit (tech .units .indriya .unit .Units .SECOND );
@@ -262,7 +269,7 @@ public final class Units extends CustomUnits {
262
269
SimpleUnitFormat .getInstance ().label (DECIBEL , "dB" );
263
270
SimpleUnitFormat .getInstance ().label (DECIBEL_MILLIWATTS , "dBm" );
264
271
SimpleUnitFormat .getInstance ().label (DEGREE_ANGLE , "°" );
265
- SimpleUnitFormat .getInstance ().label (DEUTSCHE_HAERTE , "°dH" );
272
+ SimpleUnitFormat .getInstance ().label (DEUTSCHE_HAERTE , DEUTSCHE_HAERTE . getSymbol () );
266
273
SimpleUnitFormat .getInstance ().label (DOBSON_UNIT , "DU" );
267
274
SimpleUnitFormat .getInstance ().label (GRAM_PER_KILOWATT_HOUR , "g/kWh" );
268
275
SimpleUnitFormat .getInstance ().label (GIGABYTE , "GB" );
@@ -276,6 +283,7 @@ public final class Units extends CustomUnits {
276
283
SimpleUnitFormat .getInstance ().alias (KIBIBYTE , "kio" );
277
284
SimpleUnitFormat .getInstance ().label (KILOBIT , "kbit" );
278
285
SimpleUnitFormat .getInstance ().label (KILOBIT_PER_SECOND , "kbit/s" );
286
+ SimpleUnitFormat .getInstance ().label (KILOGRAM_PER_SQUARE_METRE , "kg/m²" );
279
287
SimpleUnitFormat .getInstance ().label (KILOVAR , "kvar" );
280
288
SimpleUnitFormat .getInstance ().label (KILOVAR_HOUR , "kvarh" );
281
289
SimpleUnitFormat .getInstance ().label (KILOVOLT_AMPERE , "kVA" );
@@ -315,6 +323,7 @@ public final class Units extends CustomUnits {
315
323
SimpleUnitFormat .getInstance ().label (VOLT_AMPERE , "VA" );
316
324
SimpleUnitFormat .getInstance ().label (VOLT_AMPERE_HOUR , "VAh" );
317
325
SimpleUnitFormat .getInstance ().label (WATT_HOUR , "Wh" );
326
+ SimpleUnitFormat .getInstance ().label (WATT_HOUR_PER_SQUARE_METRE , "Wh/m²" );
318
327
SimpleUnitFormat .getInstance ().label (WATT_SECOND , "Ws" );
319
328
320
329
// workarounds for https://github.com/unitsofmeasurement/indriya/issues/409
0 commit comments