Add and use more unit constants (#32122)
* Add and use speed constants * Add and use meter based volume and area constants * Add and use more mass unit constants * Add and use concentration unit constants * Add and use watts per square meter constant * Use more time constants * Use more data constants
This commit is contained in:
1 parent
c98f50115d
commit
496bd3dddf
44 files changed
+422
-177
No files matched your search
@@ -375,13 +375,19 @@ PRESSURE_PSI: str = "psi"
|
||||
# Volume units
|
||||
VOLUME_LITERS: str = "L"
|
||||
VOLUME_MILLILITERS: str = "mL"
|
||||
VOLUME_CUBIC_METERS = f"{LENGTH_METERS}³"
|
||||
|
||||
VOLUME_GALLONS: str = "gal"
|
||||
VOLUME_FLUID_OUNCE: str = "fl. oz."
|
||||
|
||||
# Area units
|
||||
AREA_SQUARE_METERS = f"{LENGTH_METERS}²"
|
||||
|
||||
# Mass units
|
||||
MASS_GRAMS: str = "g"
|
||||
MASS_KILOGRAMS: str = "kg"
|
||||
MASS_MILLIGRAMS = "mg"
|
||||
MASS_MICROGRAMS = "µg"
|
||||
|
||||
MASS_OUNCES: str = "oz"
|
||||
MASS_POUNDS: str = "lb"
|
||||
@@ -389,6 +395,20 @@ MASS_POUNDS: str = "lb"
|
||||
# UV Index units
|
||||
UNIT_UV_INDEX: str = "UV index"
|
||||
|
||||
# Irradiation units
|
||||
IRRADIATION_WATTS_PER_SQUARE_METER = f"{POWER_WATT}/{AREA_SQUARE_METERS}"
|
||||
|
||||
# Concentration units
|
||||
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER = f"{MASS_MICROGRAMS}/{VOLUME_CUBIC_METERS}"
|
||||
CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER = f"{MASS_MILLIGRAMS}/{VOLUME_CUBIC_METERS}"
|
||||
CONCENTRATION_PARTS_PER_MILLION = "ppm"
|
||||
CONCENTRATION_PARTS_PER_BILLION = "ppb"
|
||||
|
||||
# Speed units
|
||||
SPEED_METERS_PER_SECOND = f"{LENGTH_METERS}/{TIME_SECONDS}"
|
||||
SPEED_KILOMETERS_PER_HOUR = f"{LENGTH_KILOMETERS}/{TIME_HOURS}"
|
||||
SPEED_MILES_PER_HOUR = "mph"
|
||||
|
||||
# Data units
|
||||
DATA_BITS = "bit"
|
||||
DATA_KILOBITS = "kbit"
|
||||
|
||||
Reference in new issue
Block a user