-
Notifications
You must be signed in to change notification settings - Fork 97
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
Added logarithmic units #229
base: master
Are you sure you want to change the base?
Conversation
Thanks for the PR! My plan right now is to finish up the two other open PRs thenpush out a new version. After that I'll dig into this PR in more detail. |
I finally released v0.31.0 earlier today and will start reviewing this now. Took me a bit longer than expected! |
Could you possibly rebase this on top of master? The recent change to extract some of the code from quantity.rs into unit.rs is causing conflicts with this PR. I started looking to do this but never ended up finishing with the limited time I've had recently. |
I'll take a look over the weekend. |
Finally got a chance to rebase. https://github.com/iliekturtles/uom/compare/Atmelfan-master Will start reviewing for real now! |
I finally finished my library book, which I'm going to blame any delays on. I have been reading about power and root-power quantities and digging in to this more and wanted to provide an update. The trait changes mostly need minor fixes like documentation and formating. I believe the |
It seems right to me, but I might be reading it wrong? Ratio, base 10, scale 20: @part_per_billion: 1.0_E-9; "ppb", "part per billion", "parts per billion";
@part_per_trillion: 1.0_E-12; "ppt", "part per trillion", "parts per trillion";
@part_per_quadrillion: 1.0_E-15; "ppq", "part per quadrillion", "parts per quadrillion";
+
+ @decibel: 1.0, 10.0, 20.0; "dB", "decibel", "decibels";
}
} Power, base 10, scale 10 + @decibel_watt: prefix!(none), 10.0, 10.0; "dBW", "decibel-watt", "decibel-watts";
+ @decibel_milliwatt: prefix!(milli), 10.0, 10.0; "dBm", "decibel-milliwatt", "decibel-milliwatts";// dBm is more common than dBmW
+ @decibel_microwatt: prefix!(micro), 10.0, 10.0; "dBµW", "decibel-microwatt", "decibel-microwatts";
|
Logarithmic units require |
Poor attempt at implementing #201.
No tests, doesn't compile under no_std, missing documentation, fails CI, etc. Breaks every rule regarding macros and generic programming.