Open keilw opened 4 years ago
@andi-huber Similar to #91 there are also issues with CO2CarDemo. It should show 1033.9838600 kg for the "Ferrari-Enzo6" but only does 1.0339838600 kg. I will have a look but if you got a chance to address it in a similar way, it would be appreciated.
ok no problem ... should be able to find some time for it next week
The calculation really feels awkward, what was the exact requirement to change this calculation to always use a system unit and can you point us to the ticket where this requirement was defined?
If you have something like "litre/100km" the formula worked well and readable before, now you need strange things like ENERGY_NEEDED_PER_MILLILITRE_AND_KELVIN
as in #91 that look artificial, so I am thinking we should probably allow to configure that and not enforce it everywhere.
I recall it was only for a very limited case like CELSIUS
to FAHRENHEIT
and now it messes with every single calculation.
I'll look into this. Should not be too hard to restore the previous multiplication behavior in Indriya. (Introducing support for doing calculation with relative scoped quantities was tricky, I should clean this up a bit anyway.)
It seems that cases like https://github.com/unitsofmeasurement/indriya/issues/288 were a reason for this, but maybe the behavior should be restricted to e.g. RELATIVE
quantities, e.g. the HeatRequirementDemo
I would say it could make sense there, but in the CO2 demo there is no relative value.
So if we could restrict that conversion to either just RELATIVE
quantities or e.g. if at least one quantity has a different scale than the others, that could help.
We (@thodorisbais and I) have a presentation on August 1 about the JSR, it would be nice to have at least a Snapshot of Indriya with these improvements.
Self assigned https://github.com/unitsofmeasurement/indriya/issues/294
CO2CarDemo fixed
Following #10 we should improve them by adding more demos, e.g. based on https://co2.myclimate.org/de/flight_calculators/new