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(si): add specific power quantity #394

Closed
wants to merge 4 commits into from
Closed

feat(si): add specific power quantity #394

wants to merge 4 commits into from

Conversation

swaits
Copy link
Contributor

@swaits swaits commented Dec 31, 2022

Specific power is used to represent a power-to-weight ratio, like in vehicles or human power; as in watts per kilogram or ft-lbf/s per pound.

Added the SpecificPower quantity using the existing Power quantity as a guideline.

For more information on this quantity, please see a description of specific power on Wikipedia.

Specific power is used to represent a power-to-weight ratio, like in
vehicles or human power; as in watts per kilogram or ft-lbf/s per pound.

Added the `SpecificPower` quantity using the existing `Power` quantity as a
guideline.

For more information on this quantity, please see a description of
[specific power](https://en.wikipedia.org/wiki/Power-to-weight_ratio) on Wikipedia.
Copy link
Owner

@iliekturtles iliekturtles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I still need to do a more in depth review, and have started test actions in the meantime.

Some of the units have multiple divisions (e.g. erg per second per kilogram). Are these commonly used this way? I've only skimmed the referenced article at this point, but generally multiple divisions avoided: https://www.nist.gov/pml/special-publication-811/nist-guide-si-chapter-6-rules-and-style-conventions-printing-and-using#616

Co-authored-by: Mike Boutin <mike.boutin@gmail.com>
@swaits
Copy link
Contributor Author

swaits commented Jan 3, 2023

I really only know of specific power's use in W/kg, (ft-lbf/<unit time>)/lb, and hp/lb. I'm completely aligned with deleting things like (erg/s)/kg as I only included it because I started with power.rs as my baseline (i.e. it's copypasta). If we're wrong and someone needs it in the future, they can ask for it or submit their own PR.

@swaits
Copy link
Contributor Author

swaits commented Jan 3, 2023

Oh... that said, I felt it important to include this one...

// Less commonly used, but more accurate (reduced) derived unit of specific power.
@square_meter_per_cubic_second: 1.0_E0; "m² · s⁻³", "square meter per cubic second", "square meters per cubic second";

... because that's the true base unit, even though it's not as commonly used as multiplied by kg/kg to look like W/kg.

@swaits
Copy link
Contributor Author

swaits commented Jan 5, 2023

Please LMK if there's anything else I can do to help make this one acceptable for merge. And thank you for considering it!

@iliekturtles
Copy link
Owner

Could rebase and resolve the si/mod.rs conflight? Otherwise I just need to finish my review. #370 is up next, then this this PR.

 * Formatting for readability.
 * Fix conversion factor used for pounds.
 * Check all units based on the units they are derived from.
   * Add `check_units_energy` test.
@iliekturtles
Copy link
Owner

I reviewed and pushed a commit to your fork. Please review, rebase, and squash the commits!

  • Formatting for readability.
  • Fix conversion factor used for pounds.
  • Check all units based on the units they are derived from.
    • Add check_units_energy test.

@swaits
Copy link
Contributor Author

swaits commented Jan 10, 2023

Hey, yes, I'll try to get to this today... I'm pretty buried in $DAYJOB but excited to figure this one out.

@swaits swaits closed this by deleting the head repository Jan 10, 2023
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