public final 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 frame axes are 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 |
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 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 Valuespublic 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()
public static void addDefaultCelestialBodyLoader(String supportedNames) throws PatriusException
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.
PatriusException
- if the header constants cannot be readaddCelestialBodyLoader(String, CelestialBodyLoader)
,
addDefaultCelestialBodyLoader(String)
,
clearCelestialBodyLoaders(String)
,
clearCelestialBodyLoaders()
public static void addDefaultCelestialBodyLoader(String name, String supportedNames) throws PatriusException
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.
PatriusException
- if the header constants cannot be readaddCelestialBodyLoader(String, CelestialBodyLoader)
,
addDefaultCelestialBodyLoader(String)
,
clearCelestialBodyLoaders(String)
,
clearCelestialBodyLoaders()
public static void clearCelestialBodyLoaders(String name)
name
- name of the bodyaddCelestialBodyLoader(String, CelestialBodyLoader)
,
clearCelestialBodyLoaders()
public static void clearCelestialBodyLoaders()
public static CelestialBody getSolarSystemBarycenter() throws PatriusException
PatriusException
- if the celestial body cannot be builtpublic static CelestialBody getSun() throws PatriusException
PatriusException
- if the celestial body cannot be builtpublic static CelestialBody getMercury() throws PatriusException
PatriusException
- if the celestial body cannot be builtpublic static CelestialBody getVenus() throws PatriusException
PatriusException
- if the celestial body cannot be builtpublic static CelestialBody getEarthMoonBarycenter() throws PatriusException
PatriusException
- if the celestial body cannot be builtpublic static CelestialBody getEarth() throws PatriusException
PatriusException
- if the celestial body cannot be builtpublic static CelestialBody getMoon() throws PatriusException
PatriusException
- if the celestial body cannot be builtpublic static CelestialBody getMars() throws PatriusException
PatriusException
- if the celestial body cannot be builtpublic static CelestialBody getJupiter() throws PatriusException
PatriusException
- if the celestial body cannot be builtpublic static CelestialBody getSaturn() throws PatriusException
PatriusException
- if the celestial body cannot be builtpublic static CelestialBody getUranus() throws PatriusException
PatriusException
- if the celestial body cannot be builtpublic static CelestialBody getNeptune() throws PatriusException
PatriusException
- if the celestial body cannot be builtpublic static CelestialBody getPluto() throws PatriusException
PatriusException
- if the celestial body cannot be builtpublic static CelestialBody getBody(String name) throws PatriusException
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 bodyPatriusException
- if the celestial body cannot be builtCopyright © 2020 CNES. All rights reserved.