uom-demos
uom-demos copied to clipboard
Units of Measurement Demos
While the "Java 11 LTS" demos have problems with Java 11, hence 12 is the minimal reasonable version, all demos above Java 12 should be consolidated under Java 17 (LTS)
After migrating the latest demos to Java 17 (see #95, #108) selected demos should apply [Sealed Classes](https://stackoverflow.com/questions/69218585/what-are-sealed-classes-in-java-17), e.g. - Airplane -> AirplaneDemo - BeerUnits -> Beerfest
Translate the Hurricane Demo To do this a bit more realistically, let's add all the [languages of the Caribbean](https://en.wikipedia.org/wiki/Languages_of_the_Caribbean) plus German and Portuguese (there are not many actual Hurricanes in...
The [CLDR](https://github.com/unitsofmeasurement/uom-systems/blob/master/unicode/src/main/java/systems/uom/unicode/CLDR.java) system already defined `LITER_PER_KILOMETER`, `LITER_PER_100KILOMETERS` and `MILE_PER_GALLON` as `Unit`. This overlaps with the declaration of the quantity `FuelConsumption` in the energy module. Update the `CO2CarDemo` accordingly by using...
https://en.wikipedia.org/wiki/English_wine_cask_units for the historical system demos
The Edison tutorial should be factored out, either for another device (e.g. Raspberry Pi) or independently.
Trying to create a new `Unit` RPM: ``` @Test void myRpmUnit() throws IOException { Unit RPM = AlternateUnit.of(ONE.divide(MINUTE), "rpm").asType(Frequency.class); Quantity quantity = Quantities.getQuantity(60, RPM); assertThat(quantity.to(HERTZ).getValue().doubleValue()).isEqualTo(1.0); } ``` Specifying alternate as...
Either in the `AirplaneDemo` or a separate demo app let's visualize the [Mach number](https://en.wikipedia.org/wiki/Mach_number) using a `QuantityRange` similar to the Hurricane Scales.