Add ounce-force torque units#1685
Conversation
angularsen
left a comment
There was a problem hiding this comment.
Thanks, I think these units are reasonable for Torque.
Let's keep the primary abbreviations as ozf·in and ozf·ft, since those are the technically precise force-unit forms. Add the common shorthand aliases as secondary abbreviations. I found oz·in, oz-in, and in-oz used for small torque, and oz·ft/oz-ft used in torque converters. I did not find enough support for ft-oz, so I would leave that out for now.
I suggest this shape:
OunceForceFoot:
"Abbreviations": [ "ozf·ft", "oz·ft", "ozf-ft", "oz-ft" ]OunceForceInch:
"Abbreviations": [ "ozf·in", "oz·in", "ozf-in", "oz-in", "in-oz" ]Since this PR already touches Torque, let's also add the same common aliases for the existing pound-force torque units:
PoundForceFoot:
"Abbreviations": [ "lbf·ft", "lb·ft", "lbf-ft", "lb-ft", "ft-lb" ]PoundForceInch:
"Abbreviations": [ "lbf·in", "lb·in", "lbf-in", "lb-in", "in-lb" ]ft-lb could also be added to EnergyUnit.FootPound later, but I think that is out of scope for this PR.
One request before merging: please update the custom test constants to use values checked against a verifiable source, so the tests don't just mirror the conversion formula. The adding-unit docs call this out here: https://github.com/angularsen/UnitsNet/blob/master/Docs/adding-a-new-unit.md#4-fix-generated-test-stubs-to-resolve-compile-errors
NIST SP 811 Appendix B.9 lists 1 ozf·in = 7.061552e-3 N·m, so for example:
// NIST SP 811 Appendix B.9: 1 ozf·in = 7.061552e-3 N·m.
protected override double OunceForceInchesInOneNewtonMeter => 141.611928935735;
// Derived from the same NIST factor and 12 in/ft.
protected override double OunceForceFeetInOneNewtonMeter => 11.800994077978;f9325c4 to
d10bdb3
Compare
d10bdb3 to
b7c3b86
Compare
|
Not sure how the commits got all messed up, but I updated my branch to correctly match I'll get the conversion factor and additional unit abbreviations added tomorrow. I double checked our internal data, and it looks like we've only ever performed 4 ozf-in calibrations, 0 ozf-ft calibrations, and only about 500-600 torque calibrations in total across the last decade. Granted, we're first and foremost a force calibration laboratory, but apparently some of our customers have a need for those small loads. |
Includes the units:
I wasn't sure if I should have included the abbreviated unit abbreviations. More specifically, lbf·ft is the technical abbreviation for pound-force foot, but lb·ft is a common shorthand, along with most non-Newton based torque units.
On the other hand, oz·in and g·mm are the conventional units of
static unbalancein rotor/propeller balancing. From a brief search, static unbalance seems to be a rather niche industry and may not qualify for Units.NET's requirements. It would prevent possible conflicts for someone making a custom quantity.