|
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.AstroContext
Conductor of ephemeris calculation.
Each time a calculation needs to be done, a AstroContext
object must be
created ; this AstroContext is then in charge of the coherence of calculations.
An AstroContext is characterized by :
Body
.calcBodyCoords()
whose role is :
Field Summary | |
static java.lang.String |
JEPHEM
Constant used to designate JEphem as the astro engine. |
static java.lang.String |
SWISS_EPHEMERIS
Constant used to designate Swiss Ephemeris as the astro engine. |
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 |
Fields inherited from interface jephem.astro.spacetime.TimeConstants |
DAYS_PER_CENTURY, DAYS_PER_MILLENIUM, DAYS_PER_YEAR, JD1900, JD2000, JD2100, SECONDS_PER_DAY, TT_TDB, UTC |
Constructor Summary | |
AstroContext(double jd,
int timeFrame,
int[] bodyIndexes)
The only constructor. |
Method Summary | |
void |
calcBodyCoords(int frame,
boolean velocities)
Call to calcBodyCoords(int, int, double, boolean, int[]) with default values :
sphereCart is set to spherical,
units are set to ua, degrees, degrees for the positions and
to ua/d, deg/d, deg/d for the velocities. |
void |
calcBodyCoords(int frame,
int sphereCart,
double precision,
boolean velocities,
int[] units)
Main calculation method for body coordinate calculation. |
Body[] |
getBodies()
Returns the bodies handled by this AstroContext . |
Body |
getBody(int whichBody)
Returns the Body handled by this AstroContext whose index is 'whichBody'. |
double |
getJd()
Returns the julian day of this AstroContext . |
static void |
setAstroEngine(java.lang.String astroEngine)
Permits to indicate which implementation to use for the computations. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String JEPHEM
public static final java.lang.String SWISS_EPHEMERIS
Constructor Detail |
public AstroContext(double jd, int timeFrame, int[] bodyIndexes)
SolarSystemConstants
(for constant names) :
int[] bodyIndexes = {MERCURY, VENUS};
AstroContext ac = new AstroContext(jd, bodyIndexes);
jd
- Number of Julian Days elapsed since jan 0.5 4712 BC.timeFrame
- The time frame used to express 'jds'.
Use TimeConstants
constants.bodyIndexes
- Array containing indexes of bodies this AstroContext must handle ;
use constants from SolarSystemConstants
.Method Detail |
public void calcBodyCoords(int frame, boolean velocities) throws AstroException
calcBodyCoords(int, int, double, boolean, int[])
with default values :
sphereCart
is set to spherical,units
are set to ua, degrees, degrees for the positions and
to ua/d, deg/d, deg/d for the velocities.
AstroException
public void calcBodyCoords(int frame, int sphereCart, double precision, boolean velocities, int[] units) throws AstroException
frame
- Coordinate system in which the coordinates are expressed ;
use SpaceConstants
constants.sphereCart
- Expression mode of the coordinates (spherical, cartesian) ;
Use SpaceConstants
constants.precision
- Precision required for the calculations, expressed in arcseconds.velocities
- Indicates if the velocities need to be also calculated.units
- the desired units to express the coordinates.
Use UnitsConstants
constants.
AstroException
- if an unrecoverable error occured during computation.public Body[] getBodies()
AstroContext
.
public Body getBody(int whichBody)
AstroContext
whose index is 'whichBody'.
whichBody
- the index charcterizing the body to retrieve, using SolarSystemConstants
constants.
public double getJd()
AstroContext
.
public static void setAstroEngine(java.lang.String astroEngine)
astroEngine
- Use constants of this class to specify it.
|
JEphem site tig API Build classes |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |