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

Request: FrequencyShift #384

Closed
jossriLDR opened this issue Oct 20, 2022 · 2 comments
Closed

Request: FrequencyShift #384

jossriLDR opened this issue Oct 20, 2022 · 2 comments

Comments

@jossriLDR
Copy link
Contributor

For radar data processing "frequency slope" is a commonly used quantity, especially in FMCW radars.

It is also listed here as 'frequency drift": https://en.wikipedia.org/wiki/SI_derived_unit#Examples_of_derived_quantities_and_units

In my application I defined it like this:

use uom::{Kind, typenum::{N2, int::Z0}, si::{Quantity, ISQ, SI}};
type FrequencyDrift = Quantity<ISQ<Z0, Z0, N2, Z0, Z0, Z0, Z0, dyn Kind + 'static>, SI<f64>, f64>;

But it does not implement new() or any unit of course. From the documentation I do not understand how properly add a new quantity.

How do I add this properly? Maybe even with some commonly used units like hertz_per_second, megahertz_per_microsecond.

@iliekturtles
Copy link
Owner

As you found out you can use a type alias to easily use a quantity not explicitly defined in uom but you don't get any units. If you're willing to submit a PR adding a new quantity is really easy. See #349/ede7791 for an example where TemperatureGradient was added.

@jossriLDR
Copy link
Contributor Author

MR #388 solves this

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

No branches or pull requests

2 participants