Skip to content

Basetypes missing on Speed quantity #1245

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

Closed
Chaosflo opened this issue May 2, 2023 · 3 comments
Closed

Basetypes missing on Speed quantity #1245

Chaosflo opened this issue May 2, 2023 · 3 comments

Comments

@Chaosflo
Copy link

Chaosflo commented May 2, 2023

Is your feature request related to a problem? Please describe.
IDK, if this is intended or if its impossible but I noticed that on the SpeedQuantity some base types are missing

Example:
https://github.com/angularsen/UnitsNet/blob/c3cfde6c2e06d4aa07e21b610e494460ae88c941/UnitsNet/GeneratedCode/Quantities/Speed.g.cs#LL79C21-L79C21

What I noticed that these unit is generated with the prefix things, so I think there is something missing or off

Describe the solution you'd like
I would expect that there is a base type created with Kilometer and Hour.

Describe alternatives you've considered
There are no alternatives in my mind now.

Additional context
Why would I someone need this?
In my case I need special treatment for rates, so I need to know what the time factor is (minute, second, hour, etc.)
I would also like it for the sake of completion =) !

@angularsen
Copy link
Owner

Yes this is a known issue with prefix units. We don't have a good way define these yet and we are not eager to require manual definition of all prefix units.

There is a proposal to automate some (but not all) prefix units here:
#1233

Take a look and see if this would help for you, and if you have any ideas to improve it further.

Why would I someone need this?

One motivation for defining base units per unit is to make it easier to automatically and consistently choose units in an application.

For example, if an application displays length, area and volume units, you could let the user choose the length unit; meter, centimeter, foot, inch.

If the user chose Meter, then area/volume would use SquareMeter and CubicMeter.
If the user chose Foot, then area/volume would use SquareFoot and CubicFoot.

Base units is still experimental in my mind and we don't have a sample applications that demonstrate this capability.

@Chaosflo
Copy link
Author

Chaosflo commented May 3, 2023

Thanks for the reply, I will think of ways how to do it!

If some easy or fitting solution comes into my mind I will let you know =)

Greetings!

@angularsen
Copy link
Owner

Perfect, I'll close this then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants