Skip to content

feat: add absement quantity and units#284

Merged
iliekturtles merged 1 commit into
iliekturtles:masterfrom
nick-pascucci-spire:dev-absement
Feb 25, 2022
Merged

feat: add absement quantity and units#284
iliekturtles merged 1 commit into
iliekturtles:masterfrom
nick-pascucci-spire:dev-absement

Conversation

@nick-pascucci-spire

Copy link
Copy Markdown
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
Copy Markdown
Owner

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

@iliekturtles

Copy link
Copy Markdown
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

nick-pascucci-spire commented Feb 25, 2022

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Owner

Excellent! Will merge once the build passes.

@nick-pascucci-spire

Copy link
Copy Markdown
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