Include Rankine in imperial units and equivalencies
See original GitHub issueThis is a feature request for the addition of Rankine to temperature units. It is more useful than Fahrenheit in some cases because it is an absolute scale. The conversion between deg_F and degrees Rankine is adding 459.67. See: Rankine Scale
Proposed change in equivalencies (assuming deg_R is Rankine):
def temperature():
"""Convert between Kelvin, Celsius, and Fahrenheit here because
Unit and CompositeUnit cannot do addition or subtraction properly.
"""
from .imperial import deg_F
return Equivalency([
(si.K, si.deg_C, lambda x: x - 273.15, lambda x: x + 273.15),
(si.deg_C, deg_F, lambda x: x * 1.8 + 32.0, lambda x: (x - 32.0) / 1.8),
(si.K, deg_F, lambda x: (x - 273.15) * 1.8 + 32.0,
lambda x: ((x - 32.0) / 1.8) + 273.15),
(deg_R, deg_F, lambda x: x + 459.67, lambda x: x + 459.67),
(deg_R, si.deg_C, lambda x: (x * 1.8) + 491.67, lambda x: ((x-491.67)/1.8),
(deg_R, si.K, lambda x: x, lambda x: x)], "temperature")
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Fahrenheit to Rankine Conversion (°F to °R) - Inch Calculator
Convert Fahrenheit to Rankine (°F to °R) with the temperature conversion ... The degree Fahrenheit is a US customary and imperial unit of...
Read more >Convert Rankine (°R) to other temperature units
671.67 degrees Rankine ( °R ) = 100 degrees Celsius ( °C ) = 212 degrees Fahrenheit ( °F ). How to convert...
Read more >The international system of units (SI) - conversion factors for ...
An extensive set of conversion factors between the two systems of units is listed in Section 5. In this document, the term inch-pound...
Read more >Rankine scale - Wikipedia
The Rankine scale is an absolute scale of thermodynamic temperature named after the University of Glasgow engineer and physicist Macquorn Rankine, ...
Read more >Why do we still need to know about the Rankine temperature ...
Rankine is to Fahrenheit what Kelvin is for Celsius. ... Kelvin scales have no additive offset between them, the conversion route Fahrenheit ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@DShivansh - sure!
Yeah, I’d love to give it a try! It’s on my to-do list for next week. @mhvk