add pressure units MilligramForcePerSquareFoot and MilligramForcePerS…#1648
add pressure units MilligramForcePerSquareFoot and MilligramForcePerS…#1648TS-Andritz wants to merge 2 commits intoangularsen:masterfrom
Conversation
angularsen
left a comment
There was a problem hiding this comment.
Hi and thanks for contributing, although these units are probably a bit niche it seems useful enough to include.
Use exact coefficients for MilligramForcePerSquareFoot
Per our conversion function guidelines, prefer exact constituent constants over pre-computed decimals so the physical constants remain visible and no precision is lost.
The MilligramForcePerSquareFoot conversion uses a pre-computed decimal.
Please change from:
"FromUnitToBaseFunc": "{x} * 1.0555790208802639466e-4",
"FromBaseToUnitFunc": "{x} / 1.0555790208802639466e-4",To:
"FromUnitToBaseFunc": "{x} * 9.80665e-6 / 9.290304e-2",
"FromBaseToUnitFunc": "{x} / 9.80665e-6 * 9.290304e-2",This keeps the exact definition constants visible (9.80665 = standard gravity, 9.290304e-2 = ft² in m²) and avoids precision loss from pre-computation.
Otherwise LGTM
Naming, localization, and test values all look correct.
see discussion in pr (angularsen#1648 (review))
|
Hi, thanks for your reply. I just made the change and pushed the commit. Regarding the units, we were ourself a bit surprised by this combination of metric and imperial units, but it seems to be used by metalworking companies, specifically in the "US Customary" system of measurements. |
5c2ca8b to
b73ddd1
Compare
Adding two units used in our domain for small pressure values in two different systems of measurement (metric and US customary).