public class CelestialBodyFactory extends Object
The Sun
, the Moon
and the planets
(including the Pluto dwarf planet) are provided by this factory. In addition,
two important points are provided for convenience: the solar system barycenter
and the Earth-Moon barycenter
.
The underlying body-centered frames are either direct children of EME2000
(for Moon
and Earth-Moon barycenter
) or children from other
body-centered frames. For example, the path from EME2000 to
Jupiter-centered frame is: EME2000, Earth-Moon barycenter centered,
solar system barycenter centered, Jupiter-centered. The defining transforms
of these frames are combinations of simple linear translation/velocity
transforms
without any rotation. The frame axes are therefore always parallel to
EME2000
frame axes.
The position of the bodies provided by this class are interpolated using the JPL DE 405/DE 406 ephemerides.
Modifier and Type | Field and Description |
---|---|
static String |
EARTH
Predefined name for Earth.
|
static String |
EARTH_MOON
Predefined name for Earth-Moon barycenter.
|
static String |
JUPITER
Predefined name for Jupiter.
|
static String |
MARS
Predefined name for Mars.
|
static String |
MERCURY
Predefined name for Mercury.
|
static String |
MOON
Predefined name for Moon.
|
static String |
NEPTUNE
Predefined name for Neptune.
|
static String |
PLUTO
Predefined name for Pluto.
|
static String |
SATURN
Predefined name for Saturn.
|
static String |
SOLAR_SYSTEM_BARYCENTER
Predefined name for solar system barycenter.
|
static String |
SUN
Predefined name for Sun.
|
static String |
URANUS
Predefined name for Uranus.
|
static String |
VENUS
Predefined name for Venus.
|
Modifier and Type | Method and Description |
---|---|
static void |
addCelestialBodyLoader(String name,
CelestialBodyLoader loader)
Add a loader for celestial bodies.
|
static void |
addDefaultCelestialBodyLoader(String supportedNames)
Add the default loaders for all predefined celestial bodies.
|
static void |
addDefaultCelestialBodyLoader(String name,
String supportedNames)
Add the default loaders for celestial bodies.
|
static void |
clearCelestialBodyCache()
Clear all loaded celestial bodies.
|
static void |
clearCelestialBodyCache(String name)
Clear the specified celestial body from the internal cache.
|
static void |
clearCelestialBodyLoaders()
Clear loaders for all celestial bodies.
|
static void |
clearCelestialBodyLoaders(String name)
Clear loaders for one celestial body.
|
static CelestialBody |
getBody(String name)
Get a celestial body.
|
static LazyLoadedCelestialBodies |
getCelestialBodies()
Get the instance of
CelestialBodies that is called by the static methods in
this class. |
static CelestialBody |
getEarth()
Get the Earth singleton body.
|
static CelestialBody |
getEarthMoonBarycenter()
Get the Earth-Moon barycenter singleton bodies pair.
|
static CelestialBody |
getJupiter()
Get the Jupiter singleton body.
|
static CelestialBody |
getMars()
Get the Mars singleton body.
|
static CelestialBody |
getMercury()
Get the Mercury singleton body.
|
static CelestialBody |
getMoon()
Get the Moon singleton body.
|
static CelestialBody |
getNeptune()
Get the Neptune singleton body.
|
static CelestialBody |
getPluto()
Get the Pluto singleton body.
|
static CelestialBody |
getSaturn()
Get the Saturn singleton body.
|
static CelestialBody |
getSolarSystemBarycenter()
Get the solar system barycenter aggregated body.
|
static CelestialBody |
getSun()
Get the Sun singleton body.
|
static CelestialBody |
getUranus()
Get the Uranus singleton body.
|
static CelestialBody |
getVenus()
Get the Venus singleton body.
|
public static final String SOLAR_SYSTEM_BARYCENTER
getBody(String)
,
Constant Field Valuespublic static final String SUN
getBody(String)
,
Constant Field Valuespublic static final String MERCURY
getBody(String)
,
Constant Field Valuespublic static final String VENUS
getBody(String)
,
Constant Field Valuespublic static final String EARTH_MOON
getBody(String)
,
Constant Field Valuespublic static final String EARTH
getBody(String)
,
Constant Field Valuespublic static final String MOON
getBody(String)
,
Constant Field Valuespublic static final String MARS
getBody(String)
,
Constant Field Valuespublic static final String JUPITER
getBody(String)
,
Constant Field Valuespublic static final String SATURN
getBody(String)
,
Constant Field Valuespublic static final String URANUS
getBody(String)
,
Constant Field Valuespublic static final String NEPTUNE
getBody(String)
,
Constant Field Valuespublic static final String PLUTO
getBody(String)
,
Constant Field Values@DefaultDataContext public static LazyLoadedCelestialBodies getCelestialBodies()
CelestialBodies
that is called by the static methods in
this class.@DefaultDataContext public static void addCelestialBodyLoader(String name, CelestialBodyLoader loader)
name
- name of the body (may be one of the predefined names or a user-defined name)loader
- custom loader to add for the bodyaddDefaultCelestialBodyLoader(String)
,
clearCelestialBodyLoaders(String)
,
clearCelestialBodyLoaders()
@DefaultDataContext public static void addDefaultCelestialBodyLoader(String supportedNames)
supportedNames
- regular expression for supported files names
(may be null if the default JPL file names are used)
The default loaders look for DE405 or DE406 JPL ephemerides.
addCelestialBodyLoader(String, CelestialBodyLoader)
,
addDefaultCelestialBodyLoader(String)
,
clearCelestialBodyLoaders(String)
,
clearCelestialBodyLoaders()
@DefaultDataContext public static void addDefaultCelestialBodyLoader(String name, String supportedNames)
name
- name of the body (if not one of the predefined names, the method does nothing)supportedNames
- regular expression for supported files names
(may be null if the default JPL file names are used)
The default loaders look for DE405 or DE406 JPL ephemerides.
addCelestialBodyLoader(String, CelestialBodyLoader)
,
addDefaultCelestialBodyLoader(String)
,
clearCelestialBodyLoaders(String)
,
clearCelestialBodyLoaders()
@DefaultDataContext public static void clearCelestialBodyLoaders(String name)
Calling this method also clears the celestial body that
has been loaded via this CelestialBodyLoader
.
name
- name of the bodyaddCelestialBodyLoader(String, CelestialBodyLoader)
,
clearCelestialBodyLoaders()
,
clearCelestialBodyCache(String)
@DefaultDataContext public static void clearCelestialBodyLoaders()
Calling this method also clears all loaded celestial bodies.
@DefaultDataContext public static void clearCelestialBodyCache(String name)
name
- name of the body@DefaultDataContext public static void clearCelestialBodyCache()
Calling this method will remove all loaded bodies from the internal
cache. Subsequent calls to getBody(String)
or similar methods
will result in a reload of the requested body from the configured loader(s).
@DefaultDataContext public static CelestialBody getSolarSystemBarycenter()
Both the inertially
oriented frame
and body
oriented frame
for this aggregated body are aligned with
ICRF
(and therefore also
GCRF
)
@DefaultDataContext public static CelestialBody getSun()
@DefaultDataContext public static CelestialBody getMercury()
@DefaultDataContext public static CelestialBody getVenus()
@DefaultDataContext public static CelestialBody getEarthMoonBarycenter()
Both the inertially
oriented frame
and body
oriented frame
for this bodies pair are aligned with
ICRF
(and therefore also
GCRF
)
@DefaultDataContext public static CelestialBody getEarth()
@DefaultDataContext public static CelestialBody getMoon()
@DefaultDataContext public static CelestialBody getMars()
@DefaultDataContext public static CelestialBody getJupiter()
@DefaultDataContext public static CelestialBody getSaturn()
@DefaultDataContext public static CelestialBody getUranus()
@DefaultDataContext public static CelestialBody getNeptune()
@DefaultDataContext public static CelestialBody getPluto()
@DefaultDataContext public static CelestialBody getBody(String name)
If no CelestialBodyLoader
has been added by calling addCelestialBodyLoader
or if clearCelestialBodyLoaders
has been called afterwards,
the addDefaultCelestialBodyLoader
method will be called automatically,
once with the default name for JPL DE ephemerides and once with the
default name for IMCCE INPOP files.
name
- name of the celestial bodyCopyright © 2002-2020 CS Group. All rights reserved.