Class CelestialBodyFactory
- java.lang.Object
-
- org.orekit.bodies.CelestialBodyFactory
-
public class CelestialBodyFactory extends Object
Factory class for bodies of the solar system.The
Sun, theMoonand the planets (including the Pluto dwarf planet) are provided by this factory. In addition, two important points are provided for convenience: thesolar system barycenterand theEarth-Moon barycenter.The underlying body-centered frames are either direct children of
EME2000(forMoonandEarth-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/velocitytransforms without any rotation. The frame axes are therefore always parallel toEME2000frame 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 StringEARTHPredefined name for Earth.static StringEARTH_MOONPredefined name for Earth-Moon barycenter.static StringJUPITERPredefined name for Jupiter.static StringMARSPredefined name for Mars.static StringMERCURYPredefined name for Mercury.static StringMOONPredefined name for Moon.static StringNEPTUNEPredefined name for Neptune.static StringPLUTOPredefined name for Pluto.static StringSATURNPredefined name for Saturn.static StringSOLAR_SYSTEM_BARYCENTERPredefined name for solar system barycenter.static StringSUNPredefined name for Sun.static StringURANUSPredefined name for Uranus.static StringVENUSPredefined name for Venus.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddCelestialBodyLoader(String name, CelestialBodyLoader loader)Add a loader for celestial bodies.static voidaddDefaultCelestialBodyLoader(String supportedNames)Add the default loaders for all predefined celestial bodies.static voidaddDefaultCelestialBodyLoader(String name, String supportedNames)Add the default loaders for celestial bodies.static voidclearCelestialBodyCache()Clear all loaded celestial bodies.static voidclearCelestialBodyCache(String name)Clear the specified celestial body from the internal cache.static voidclearCelestialBodyLoaders()Clear loaders for all celestial bodies.static voidclearCelestialBodyLoaders(String name)Clear loaders for one celestial body.static CelestialBodygetBody(String name)Get a celestial body.static CelestialBodygetEarth()Get the Earth singleton body.static CelestialBodygetEarthMoonBarycenter()Get the Earth-Moon barycenter singleton bodies pair.static CelestialBodygetJupiter()Get the Jupiter singleton body.static CelestialBodygetMars()Get the Mars singleton body.static CelestialBodygetMercury()Get the Mercury singleton body.static CelestialBodygetMoon()Get the Moon singleton body.static CelestialBodygetNeptune()Get the Neptune singleton body.static CelestialBodygetPluto()Get the Pluto singleton body.static CelestialBodygetSaturn()Get the Saturn singleton body.static CelestialBodygetSolarSystemBarycenter()Get the solar system barycenter aggregated body.static CelestialBodygetSun()Get the Sun singleton body.static CelestialBodygetUranus()Get the Uranus singleton body.static CelestialBodygetVenus()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
-
addCelestialBodyLoader
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
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
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
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
public static void clearCelestialBodyLoaders()
Clear loaders for all celestial bodies.Calling this method also clears all loaded celestial bodies.
-
clearCelestialBodyCache
public static void clearCelestialBodyCache(String name)
Clear the specified celestial body from the internal cache.- Parameters:
name- name of the body
-
clearCelestialBodyCache
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
public static CelestialBody getSolarSystemBarycenter()
Get the solar system barycenter aggregated body.Both the
inertially oriented frameandbody oriented framefor this aggregated body are aligned withICRF(and therefore alsoGCRF)- Returns:
- solar system barycenter aggregated body
-
getSun
public static CelestialBody getSun()
Get the Sun singleton body.- Returns:
- Sun body
-
getMercury
public static CelestialBody getMercury()
Get the Mercury singleton body.- Returns:
- Sun body
-
getVenus
public static CelestialBody getVenus()
Get the Venus singleton body.- Returns:
- Venus body
-
getEarthMoonBarycenter
public static CelestialBody getEarthMoonBarycenter()
Get the Earth-Moon barycenter singleton bodies pair.Both the
inertially oriented frameandbody oriented framefor this bodies pair are aligned withICRF(and therefore alsoGCRF)- Returns:
- Earth-Moon barycenter bodies pair
-
getEarth
public static CelestialBody getEarth()
Get the Earth singleton body.- Returns:
- Earth body
-
getMoon
public static CelestialBody getMoon()
Get the Moon singleton body.- Returns:
- Moon body
-
getMars
public static CelestialBody getMars()
Get the Mars singleton body.- Returns:
- Mars body
-
getJupiter
public static CelestialBody getJupiter()
Get the Jupiter singleton body.- Returns:
- Jupiter body
-
getSaturn
public static CelestialBody getSaturn()
Get the Saturn singleton body.- Returns:
- Saturn body
-
getUranus
public static CelestialBody getUranus()
Get the Uranus singleton body.- Returns:
- Uranus body
-
getNeptune
public static CelestialBody getNeptune()
Get the Neptune singleton body.- Returns:
- Neptune body
-
getPluto
public static CelestialBody getPluto()
Get the Pluto singleton body.- Returns:
- Pluto body
-
getBody
public static CelestialBody getBody(String name)
Get a celestial body.If no
CelestialBodyLoaderhas been added by callingaddCelestialBodyLoaderor ifclearCelestialBodyLoadershas been called afterwards, theaddDefaultCelestialBodyLoadermethod 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
-
-