Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added new units to the TemperatureChangeRate quantity #1433

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I missed this when I last reviewed this by checking google, which gives the wrong answer:
https://www.google.com/search?q=DegreesKelvinPerMinute+In+1+DegreeCelsiusPerSecond&rlz=1C1ONGR_enNO1008NO1008&oq=DegreesKelvinPerMinute+In+1+DegreeCelsiusPerSecond&gs_lcrp=EgZjaHJvbWUqBggAEEUYOzIGCAAQRRg70gEINTE2NmowajeoAgCwAgA&sourceid=chrome&ie=UTF-8

It totally makes sense for kelvin and celsius rate of change to be equal.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@angularsen thanks for merging my PR. Do you know (roughly) when you will release a new Nuget package?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the reminder, I got busy and forgot it (again). Maybe it is my age 🤔

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahhh thank you for catching my mistake, as well as the links explaining the correct calculation!!

"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
Loading