Skip to content

Commit

Permalink
More derived units.
Browse files Browse the repository at this point in the history
We need more derived units to fill convert unit drop down.
  • Loading branch information
adeas31 authored and OpenModelica-Hudson committed Mar 23, 2016
1 parent 95e3a3b commit b472093
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Compiler/runtime/unitparser.cpp
Expand Up @@ -1116,6 +1116,17 @@ void UnitParser::initSIUnits() {
addDerived("catalyctic activity", "katal", "kat", "s-1.mol", Rational(0),
Rational(1), Rational(0), true);

// More derived units
addDerived("length", "kilometre", "km", "m", Rational(0), Rational(1000), Rational(0), true);
addDerived("length", "millimetre", "mm", "m", Rational(0), Rational(1, 1000), Rational(0), true);

addDerived("electric current", "kiloampere", "kA", "A", Rational(0), Rational(1000), Rational(0), true);
addDerived("electric current", "milliampere", "mA", "A", Rational(0), Rational(1, 1000), Rational(0), true);

addDerived("power, radiant flux", "kilowatt", "kW", "J/s", Rational(0), Rational(1000), Rational(0), true);
addDerived("power, radiant flux", "milliwatt", "mW", "J/s", Rational(0), Rational(1, 1000), Rational(0), true);
addDerived("power, radiant flux", "megawatt", "MA", "J/s", Rational(0), Rational(1000000), Rational(0), true);

commit();
}

Expand Down

0 comments on commit b472093

Please sign in to comment.