Class CelestialBodyFactory
- java.lang.Object
-
- org.orekit.bodies.CelestialBodyFactory
-
public class CelestialBodyFactory extends Object
Factory class for bodies of the solar system.The
Sun
, theMoon
and the planets (including the Pluto dwarf planet) are provided by this factory. In addition, two important points are provided for convenience: thesolar system barycenter
and theEarth-Moon barycenter
.The underlying body-centered frames are either direct children of
EME2000
(forMoon
andEarth-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 lineartranslation/velocity
transforms without any rotation. The frame axes are therefore always parallel toEME2000
frame axes.The position of the bodies provided by this class are interpolated using the JPL DE 405/DE 406 ephemerides.
- Author:
- Luc Maisonobe
-
-
Field Summary
Fields Modifier and Type Field 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.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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 ofCelestialBodies
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.
-
-
-
Field Detail
-
SOLAR_SYSTEM_BARYCENTER
public static final String SOLAR_SYSTEM_BARYCENTER
Predefined name for solar system barycenter.- See Also:
getBody(String)
, Constant Field Values
-
SUN
public static final String SUN
Predefined name for Sun.- See Also:
getBody(String)
, Constant Field Values
-
MERCURY
public static final String MERCURY
Predefined name for Mercury.- See Also:
getBody(String)
, Constant Field Values
-
VENUS
public static final String VENUS
Predefined name for Venus.- See Also:
getBody(String)
, Constant Field Values
-
EARTH_MOON
public static final String EARTH_MOON
Predefined name for Earth-Moon barycenter.- See Also:
getBody(String)
, Constant Field Values
-
EARTH
public static final String EARTH
Predefined name for Earth.- See Also:
getBody(String)
, Constant Field Values
-
MOON
public static final String MOON
Predefined name for Moon.- See Also:
getBody(String)
, Constant Field Values
-
MARS
public static final String MARS
Predefined name for Mars.- See Also:
getBody(String)
, Constant Field Values
-
JUPITER
public static final String JUPITER
Predefined name for Jupiter.- See Also:
getBody(String)
, Constant Field Values
-
SATURN
public static final String SATURN
Predefined name for Saturn.- See Also:
getBody(String)
, Constant Field Values
-
URANUS
public static final String URANUS
Predefined name for Uranus.- See Also:
getBody(String)
, Constant Field Values
-
NEPTUNE
public static final String NEPTUNE
Predefined name for Neptune.- See Also:
getBody(String)
, Constant Field Values
-
PLUTO
public static final String PLUTO
Predefined name for Pluto.- See Also:
getBody(String)
, Constant Field Values
-
-
Method Detail
-
getCelestialBodies
@DefaultDataContext public static LazyLoadedCelestialBodies getCelestialBodies()
Get the instance ofCelestialBodies
that is called by the static methods in this class.- Returns:
- the reference frames used by this factory.
-
addCelestialBodyLoader
@DefaultDataContext public static void addCelestialBodyLoader(String name, CelestialBodyLoader loader)
Add a loader for celestial bodies.- Parameters:
name
- name of the body (may be one of the predefined names or a user-defined name)loader
- custom loader to add for the body- See Also:
addDefaultCelestialBodyLoader(String)
,clearCelestialBodyLoaders(String)
,clearCelestialBodyLoaders()
-
addDefaultCelestialBodyLoader
@DefaultDataContext public static void addDefaultCelestialBodyLoader(String supportedNames)
Add the default loaders for all predefined celestial bodies.- Parameters:
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.
- See Also:
- DE405 JPL ephemerides,
DE406 JPL ephemerides,
addCelestialBodyLoader(String, CelestialBodyLoader)
,addDefaultCelestialBodyLoader(String)
,clearCelestialBodyLoaders(String)
,clearCelestialBodyLoaders()
-
addDefaultCelestialBodyLoader
@DefaultDataContext public static void addDefaultCelestialBodyLoader(String name, String supportedNames)
Add the default loaders for celestial bodies.- Parameters:
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.
- See Also:
- DE405 JPL ephemerides,
DE406 JPL ephemerides,
addCelestialBodyLoader(String, CelestialBodyLoader)
,addDefaultCelestialBodyLoader(String)
,clearCelestialBodyLoaders(String)
,clearCelestialBodyLoaders()
-
clearCelestialBodyLoaders
@DefaultDataContext public static void clearCelestialBodyLoaders(String name)
Clear loaders for one celestial body.Calling this method also clears the celestial body that has been loaded via this
CelestialBodyLoader
.- Parameters:
name
- name of the body- See Also:
addCelestialBodyLoader(String, CelestialBodyLoader)
,clearCelestialBodyLoaders()
,clearCelestialBodyCache(String)
-
clearCelestialBodyLoaders
@DefaultDataContext public static void clearCelestialBodyLoaders()
Clear loaders for all celestial bodies.Calling this method also clears all loaded celestial bodies.
-
clearCelestialBodyCache
@DefaultDataContext public static void clearCelestialBodyCache(String name)
Clear the specified celestial body from the internal cache.- Parameters:
name
- name of the body
-
clearCelestialBodyCache
@DefaultDataContext public static void clearCelestialBodyCache()
Clear all loaded celestial bodies.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).
-
getSolarSystemBarycenter
@DefaultDataContext public static CelestialBody getSolarSystemBarycenter()
Get the solar system barycenter aggregated body.Both the
inertially oriented frame
andbody oriented frame
for this aggregated body are aligned withICRF
(and therefore alsoGCRF
)- Returns:
- solar system barycenter aggregated body
-
getSun
@DefaultDataContext public static CelestialBody getSun()
Get the Sun singleton body.- Returns:
- Sun body
-
getMercury
@DefaultDataContext public static CelestialBody getMercury()
Get the Mercury singleton body.- Returns:
- Sun body
-
getVenus
@DefaultDataContext public static CelestialBody getVenus()
Get the Venus singleton body.- Returns:
- Venus body
-
getEarthMoonBarycenter
@DefaultDataContext public static CelestialBody getEarthMoonBarycenter()
Get the Earth-Moon barycenter singleton bodies pair.Both the
inertially oriented frame
andbody oriented frame
for this bodies pair are aligned withICRF
(and therefore alsoGCRF
)- Returns:
- Earth-Moon barycenter bodies pair
-
getEarth
@DefaultDataContext public static CelestialBody getEarth()
Get the Earth singleton body.- Returns:
- Earth body
-
getMoon
@DefaultDataContext public static CelestialBody getMoon()
Get the Moon singleton body.- Returns:
- Moon body
-
getMars
@DefaultDataContext public static CelestialBody getMars()
Get the Mars singleton body.- Returns:
- Mars body
-
getJupiter
@DefaultDataContext public static CelestialBody getJupiter()
Get the Jupiter singleton body.- Returns:
- Jupiter body
-
getSaturn
@DefaultDataContext public static CelestialBody getSaturn()
Get the Saturn singleton body.- Returns:
- Saturn body
-
getUranus
@DefaultDataContext public static CelestialBody getUranus()
Get the Uranus singleton body.- Returns:
- Uranus body
-
getNeptune
@DefaultDataContext public static CelestialBody getNeptune()
Get the Neptune singleton body.- Returns:
- Neptune body
-
getPluto
@DefaultDataContext public static CelestialBody getPluto()
Get the Pluto singleton body.- Returns:
- Pluto body
-
getBody
@DefaultDataContext public static CelestialBody getBody(String name)
Get a celestial body.If no
CelestialBodyLoader
has been added by callingaddCelestialBodyLoader
or ifclearCelestialBodyLoaders
has been called afterwards, theaddDefaultCelestialBodyLoader
method will be called automatically, once with the default name for JPL DE ephemerides and once with the default name for IMCCE INPOP files.- Parameters:
name
- name of the celestial body- Returns:
- celestial body
-
-