Can't add new Unit into UnitDB in Udunits #1340
Unanswered
rakpawel
asked this question in
Questions and Answers
Replies: 1 comment 1 reply
-
If I understand correctly, your problem is that the
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I'm playing with the Udunits library in Java (I know it's available in Udunits 2, but there are no Java implementations).
I'm trying to handle logarithmic units (e.g. dB, dBW, dBm).
What I've done already is:
and it all works nicely.
What I'm trying to achieve is to create dB prefix and add it to
UnitDB
to be able to parse strings like "10 dBm" later on in my application.Perfect scenario would be to have also
dB
added to UnitDB and be able to combine it with all different units.I can add
UnitDBManager.instance().addUnit(parser.parse("lg(re 1)"))
- but then noUnitName
is specified.It looks like I'm missing something really obvious, could you point me into the right direction?
Beta Was this translation helpful? Give feedback.
All reactions