|
JNISpice version 2.0.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectspice.basic.Units
public abstract class Units
Class Units represents physical units and supports conversions between them.
Version 1.0.0 12-JUL-2009 (NJB)
Constructor Summary | |
---|---|
Units()
|
Method Summary | |
---|---|
static double |
convert(double quantity,
Units fromUnits,
Units toUnits)
Convert a quantity from one set of units to another. |
abstract java.lang.String |
toString()
Return a String representation of a Unit. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Units()
Method Detail |
---|
public abstract java.lang.String toString()
toString
in class java.lang.Object
public static double convert(double quantity, Units fromUnits, Units toUnits) throws SpiceException
The full set of units supported by the underlying conversion algorithm is shown below. However, support for many of these units is not yet implemented in the Alpha version of JNISpice.
Angles: "RADIANS" "DEGREES" "ARCMINUTES" "ARCSECONDS" "HOURANGLE" "MINUTEANGLE" "SECONDANGLE" Metric Distances: "METERS" "KM" "CM" "MM" English Distances: "FEET" "INCHES" "YARDS" "STATUTE_MILES" "NAUTICAL_MILES" Astrometric Distances: "AU" "PARSECS" "LIGHTSECS" "LIGHTYEARS" julian lightyears Time: "SECONDS" "MINUTES" "HOURS" "DAYS" "JULIAN_YEARS" "TROPICAL_YEARS" "YEARS" (same as julian years)
SpiceException
|
JNISpice version 2.0.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |