Skip to content

v3.0.0 - Changed DMS formatting, added Acoustic and Electric quantities

Choose a tag to compare

@pjazdzyk pjazdzyk released this 18 Oct 15:55
· 35 commits to master since this release
a495cae

CHANGE LOG (18.10.2025):

  • backward compatibility: NOT COMPATIBLE, breaking changes
  • removed deprecated CUBIC_FEET Volume unit
  • Geo quantities: changed completely DMS formatting to ensure ICAO Annex 15 DMS_s format requirements, preserving the constant output length, with required trailing zeros. DMS formatting method were refactored to toDMSsFormat()
  • DMS methods no longer accepts relevantDigits as optional parameter. It has now been changed to 'resolution', expressed as decimal number eg: 0.01 representing the resolution in which seconds will be displayed. By default value of 0.01 is assumed, to follow minimum ICAO requirements.
// Latitude and Longitude types are based on Angular units
Latitude latitude = Latitude.ofDegrees(-20.123);
Longitude longitude = Longitude.ofDegrees(20.123);

// ICAO Annex 15 compliant DMS formatting with 0.01 seconds resolution
String latInDMS = latitude.toDMSFormat();           // Outputs: 20°07'22.80"S
String lonInDMS = longitude.toDMSFormat();          // Outputs: 020°07'22.80"E
  • Latitude, Longitude, GeoCoordinate: add factory method ofDMSFormat(String dmsFormat) which allows to create geo quantity directly from DMS string.

BUGS FIXED:

  • fixed bug with hardcoded decimal separator, which caused issues when user uses ',' as decimal separator instead of '.', thanks @gcng54.

NEW QUANTITIES:

  • added Acoustic quantities: SoundPower, SoundPressure, Frequency
  • added Electric quantities: Capacitance, Charge, Conductance, Current, Voltage, Resistance
  • added Common quantities: DataSize

NEW UNITS:

  • Distance: YARD, DATA MILE, DECAMETER, HECTOMETER