-
Notifications
You must be signed in to change notification settings - Fork 9
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
Update CO2CarDemo based on CLDR #97
Comments
regarding CLDR units: Avoid use of double type factors when defining Units, instead use integers or rational numbers (in case the definition allows us to). eg:
regarding Consumption: Defining consumption based on volume per length might be considered bad practice, because for any given substance consumed, it's volume is dependent on its temperature and pressure. So to improve on that one could define consumption as mass per length, but then this is not generic enough, because, one could also think of consumption as being of units mass per time. |
@andi-huber Thanks for the update, so I guess you suggest to go with the Please create a PR against CLDR with the precision changes. Once we took the FuelConsumption into consideration, do you think that'll solve the problem in https://github.com/unitsofmeasurement/uom-systems/blob/master/unicode/src/test/java/systems/uom/unicode/FuelConsumptionTest.java (unitsofmeasurement/uom-systems#177), or could that also have something to do with using double? Note, Indriya has a major Jigsaw problem, so let's be extra careful with solving any functional problems beyond 2.0.4 before that is addressed, see unitsofmeasurement/indriya#306. |
The CLDR system already defined
LITER_PER_KILOMETER
,LITER_PER_100KILOMETERS
andMILE_PER_GALLON
asUnit<Consumption<Volume>>
. This overlaps with the declaration of the quantityFuelConsumption
in the energy module. Update theCO2CarDemo
accordingly by using the CLDR units if possible.Should there be a problem with
Consumption
, we might have to reconsider it and move the FuelConsumption type tosystems-quantity
so it may be used by CLDR.The text was updated successfully, but these errors were encountered: