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

feat: add absement quantity and units #284

Merged
merged 1 commit into from
Feb 25, 2022

Conversation

nick-pascucci-spire
Copy link
Contributor

Absement is a measure of the time-integrated displacement of an object. It is measured as a product of length and time. This PR adds an absement module to the SI system along with corresponding units.

@iliekturtles
Copy link
Owner

Thanks for the PR! I'm going to try to review today.

@iliekturtles
Copy link
Owner

Changes look really good. Only change that is really needed is wrapping one of the long lines:

diff --git a/src/si/absement.rs b/src/si/absement.rs
index a4b56a8..59bcaf1 100644
--- a/src/si/absement.rs
+++ b/src/si/absement.rs
@@ -74,7 +74,8 @@ mod tests {

         #[test]
         fn check_dimension() {
-            let _: Absement<V> = Length::new::<l::meter>(V::one()) * Time::new::<t::second>(V::one());
+            let _: Absement<V> = Length::new::<l::meter>(V::one())
+                * Time::new::<t::second>(V::one());
         }

         #[test]

Are there any other common units that should be added right now? You're also welcome to squash your commits into one.

@nick-pascucci-spire
Copy link
Contributor Author

nick-pascucci-spire commented Feb 25, 2022

Only change that is really needed is wrapping one of the long lines

Sure thing, 549c53e should handle that.

Are there any other common units that should be added right now?

I think the most common ones are likely to be m*s, mm*s, km*s, ft*s, and km*h. This quantity is most likely to be used for PID control of actuators, so unless someone is doing something quite exotic these should be sufficient.

You're also welcome to squash your commits into one.

No problem, I'll squash and force push now.

@iliekturtles
Copy link
Owner

Excellent! Will merge once the build passes.

@nick-pascucci-spire
Copy link
Contributor Author

Thanks for reviewing, and for uom! It's a great library.

@iliekturtles iliekturtles merged commit 1d81d49 into iliekturtles:master Feb 25, 2022
@nick-pascucci-spire nick-pascucci-spire deleted the dev-absement branch February 28, 2022 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants