-
Notifications
You must be signed in to change notification settings - Fork 621
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
Add force and torque units to wpiunits #6676
Conversation
/format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming can be improved.
Imperial units (pounds-force, foot-pounds, inch-pounds, etc) would also be helpful to include
Just out of curiosity. Is it possible to setup some alias for LinearVelocity. I’d like to jump down that rabbit hole but didn’t want to waste my time if it had already been attempted. |
/format |
/format |
Anything I should do with this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@narmstro2020 Nope, this PR looks good
|
||
/** A unit of force equivalent to 4.448222 {@link #Newtons}. */ | ||
public static final Mult<Mass, Velocity<Velocity<Distance>>> PoundsForce = | ||
derive(Newtons).aggregate(4.448222).named("Pounds-Force").symbol("lb.").make(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fun fact, the units work out such that using derive(Pounds.mult(Gs))
would accomplish the same thing while letting the library handle the unit conversions for you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So that leaves the big PR I worked on last week. I'm sure it will take some time to sift through if its got any merit.
Superseded by #6958. |
Add Newtons for force and NewtonMeters for torque to the units API.
Also added singular aliases