Skip to content

Commit

Permalink
Add and fix units of TemperatureChangeRate (#1433)
Browse files Browse the repository at this point in the history
added the following units to TemperatureChangeRate:
DegreeFahrenheitPerMinute
DegreeFahrenheitPerSecond
DegreeKelvinPerSecond
DegreeCelsiusPerHour
DegreeKelvinPerHour
DegreeFahrenheitPerHour

After reviewing the unit tests I came to the conclusion that the
recently added (#1429) unit
DegreeKelvinPerMinute had a wrong conversion.

I checked that for example here:

https://www.unitsconverters.com/en/Rate-Of-Temperature-Change-Conversions/Measurement-1189
and also here:

https://www.quora.com/Why-is-32-not-used-when-converting-per-degree-Celsius-C-1-to-per-degree-Fahrenheit-F-1
  • Loading branch information
David-HH-Dev authored Dec 7, 2024
1 parent e32a276 commit 1d1d5ac
Show file tree
Hide file tree
Showing 11 changed files with 636 additions and 32 deletions.
78 changes: 76 additions & 2 deletions Common/UnitDefinitions/TemperatureChangeRate.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,89 @@
{
"SingularName": "DegreeKelvinPerMinute",
"PluralName": "DegreesKelvinPerMinute",
"FromUnitToBaseFunc": "({x} / 60) - 273.15",
"FromBaseToUnitFunc": "({x} + 273.15) * 60",
"FromUnitToBaseFunc": "{x} / 60",
"FromBaseToUnitFunc": "{x} * 60",
"Prefixes": [],
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "K/min" ]
}
]
},
{
"SingularName": "DegreeFahrenheitPerMinute",
"PluralName": "DegreesFahrenheitPerMinute",
"FromUnitToBaseFunc": "{x} * 5 / 9 / 60",
"FromBaseToUnitFunc": "{x} * 9 / 5 * 60",
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "°F/min" ]
}
]
},
{
"SingularName": "DegreeFahrenheitPerSecond",
"PluralName": "DegreesFahrenheitPerSecond",
"FromUnitToBaseFunc": "{x} * 5 / 9",
"FromBaseToUnitFunc": "{x} * 9 / 5",
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "°F/s" ]
}
]
},
{
"SingularName": "DegreeKelvinPerSecond",
"PluralName": "DegreesKelvinPerSecond",
"FromUnitToBaseFunc": "{x}",
"FromBaseToUnitFunc": "{x}",
"Prefixes": [],
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "K/s" ]
}
]
},
{
"SingularName": "DegreeCelsiusPerHour",
"PluralName": "DegreesCelsiusPerHour",
"FromUnitToBaseFunc": "{x} / 3600",
"FromBaseToUnitFunc": "{x} * 3600",
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "°C/h" ]
}
]
},
{
"SingularName": "DegreeKelvinPerHour",
"PluralName": "DegreesKelvinPerHour",
"FromUnitToBaseFunc": "{x} / 3600",
"FromBaseToUnitFunc": "{x} * 3600",
"Prefixes": [],
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "K/h" ]
}
]
},
{
"SingularName": "DegreeFahrenheitPerHour",
"PluralName": "DegreesFahrenheitPerHour",
"FromUnitToBaseFunc": "{x} * 5 / 9 / 3600",
"FromBaseToUnitFunc": "{x} * 9 / 5 * 3600",
"Localization": [
{
"Culture": "en-US",
"Abbreviations": [ "°F/h" ]
}
]
}
]
}
8 changes: 7 additions & 1 deletion Common/UnitEnumValues.g.json
Original file line number Diff line number Diff line change
Expand Up @@ -1452,7 +1452,13 @@
"MicrodegreeCelsiusPerSecond": 8,
"MillidegreeCelsiusPerSecond": 9,
"NanodegreeCelsiusPerSecond": 10,
"DegreeKelvinPerMinute": 20
"DegreeKelvinPerMinute": 20,
"DegreeCelsiusPerHour": 18,
"DegreeFahrenheitPerHour": 11,
"DegreeFahrenheitPerMinute": 16,
"DegreeFahrenheitPerSecond": 19,
"DegreeKelvinPerHour": 12,
"DegreeKelvinPerSecond": 15
},
"TemperatureDelta": {
"DegreeCelsius": 1,
Expand Down

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.

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

Loading

0 comments on commit 1d1d5ac

Please sign in to comment.