|
JEphem site tig API Build classes |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jephem.astro.spacetime.Units
Contains methods to format and transform units and coordinates.
Realted constants are located in UnitsConstants
Methods of this class permit to get labels associated with coordinates. They are normally
retrieved from 'properties' files, for internationalization ; if a problem occurs, hard coded English
labels are used.
Field Summary |
Fields inherited from interface tig.GeneralConstants |
BLANK, FS, LS, NO_SPECIF, SPACE |
Fields inherited from interface jephem.astro.solarsystem.SolarSystemConstants |
E0_1900, E0_1950, E0_2000, EARTH, JUPITER, KM_PER_AU, MARS, MERCURY, MOON, NB_BODIES, NEPTUNE, PLUTO, SATURN, SIDERAL_RATE, SUN, URANUS, VENUS |
Fields inherited from interface jephem.astro.spacetime.SpaceConstants |
CARTESIAN, COORD_V0, COORD_V1, COORD_V2, COORD_X0, COORD_X1, COORD_X2, COORDGROUP_DELTA_BETA_LAMBDA, COORDGROUP_DIST_ALPHA_DELTA, COORDGROUP_RLB, COORDGROUP_XYZ, FRAME_EC_HELIO_GEOMETRIC, FRAME_ECLIPTIC, FRAME_EQUATORIAL, FRAME_GALACTIC, FRAME_HORIZONTAL_TOPOCENTRIC, FRAME_THEORY, LIGHT_VELOCITY, NB_COORDS, SPHERICAL |
Constructor Summary | |
Units()
|
Method Summary | |
static double[] |
convertUnits(double[] coords,
int[] units1,
int[] units2)
Converts coordinates expressed with 'units1' to coordinates expressed with 'units2'. |
static Vector3 |
convertUnits(Vector3 coords,
int[] units1,
int[] units2)
Method equivalent to convertUnits(double[],int[],int[]) ,
using Vector3 instead of double . |
static java.lang.String |
getUnitLabel(int unit)
Returns the English label of a unit. |
static java.lang.String[] |
getUnitLabels(int unitType)
Returns the English labels of units of a certain type. |
static int[] |
getUnits(int unitType)
Returns the constants expressing the units of a certain type. |
static int |
getUnitType(int coordExpr,
int whichCoord)
Returns the type of unit depending on coordinate expression (spherical / cartesian) and the concerned coordinate (X0, X1, X2, V0, V1, V2). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Units()
Method Detail |
public static double[] convertUnits(double[] coords, int[] units1, int[] units2)
coords
- The coordinates to convert, expressed with 'units1'.units1
- The units used to express 'coords'.units2
- The units used to express the returned coordinates.
java.lang.IllegalArgumentException
- if :
public static Vector3 convertUnits(Vector3 coords, int[] units1, int[] units2)
convertUnits(double[],int[],int[])
,
using Vector3
instead of double
.
public static java.lang.String getUnitLabel(int unit)
getUnits(int)
.
public static java.lang.String[] getUnitLabels(int unitType)
public static int[] getUnits(int unitType)
getUnitLabels(int)
.
public static int getUnitType(int coordExpr, int whichCoord)
getUnitType(SPHERICAL, COORD_X0)
returns TYPE_DISTANCE
.
coordExpr
- Coordinate expression (use SpaceConstants.SPHERICAL
or SpaceConstants.CARTESIAN
).whichCoord
- The concerned coordinate (use SpaceConstants
.COORD_XX
constants).
|
JEphem site tig API Build classes |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |