-
Notifications
You must be signed in to change notification settings - Fork 17
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
Liters per 100 km to mpg conversion issue #177
Comments
177: Liters per 100 km to mpg conversion issue Task-Url: #177
177: Liters per 100 km to mpg conversion issue Task-Url: unitsofmeasurement/uom-systems#177
@andi-huber This test is there but disabled as FuelConsumptionTest I think this is related to the CO2CarDemo. Doing this with |
Was checking out
|
Sounds weird, never saw that, which JDK are you using? |
a bit outdated ...
Which JDK major version do I need? |
Try at least 9. The library should run with Java 8 based on the demos, but building requires Java 9 for most repositories. The Travis matrix uses 9, and 12-16, they all build correctly. |
In CLDR those 2 definitions are wrong! /**Constant for unit of consumption: liter-per-100kilometers*/
public static final Unit<Consumption<Volume>> LITER_PER_100KILOMETERS = addUnit(
(KILOMETER.multiply(100)).divide(LITER).asType(Consumption.class));;
/**Constant for unit of consumption: liter-per-kilometer*/
public static final Unit<Consumption<Volume>> LITER_PER_KILOMETER = addUnit(
KILOMETER.divide(LITER).asType(Consumption.class)); The divisions need to be flipped! And then also note: public static final Unit<Consumption<Volume>> MILE_PER_GALLON = addUnit(
MILE.divide(GALLON).asType(Consumption.class)); Hope that helps. |
Thanks, do you think we could get to a PR for that? And what about the discussion in unitsofmeasurement/uom-demos#97? If |
@andi-huber Any luck building this? I changed the division in two cases and found a good Wikipedia reference: https://en.wikipedia.org/wiki/Fuel_efficiency So according to that: There are terms like Energy efficiency and Fuel Efficiency which brings us back to the original page, so maybe call the |
There does not seem to be much activity here, so moving it to a later milestone. |
The conversion from liters per 100 km to miles per gallon is not working as expected. You can execute this JUnit test to observe this issue:
Related to unitsofmeasurement/uom-demos#97
The text was updated successfully, but these errors were encountered: