Class CelestialBodyFactory
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.
- Author:
- Luc Maisonobe
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringPredefined name for Earth.static final StringPredefined name for Earth-Moon barycenter.static final StringPredefined name for Jupiter.static final StringPredefined name for Mars.static final StringPredefined name for Mercury.static final StringPredefined name for Moon.static final StringPredefined name for Neptune.static final StringPredefined name for Pluto.static final StringPredefined name for Saturn.static final StringPredefined name for solar system barycenter.static final StringPredefined name for Sun.static final StringPredefined name for Uranus.static final StringPredefined name for Venus. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 voidClear all loaded celestial bodies.static voidClear the specified celestial body from the internal cache.static voidClear loaders for all celestial bodies.static voidClear loaders for one celestial body.static CelestialBodyGet a celestial body.static LazyLoadedCelestialBodiesGet the instance ofCelestialBodiesthat is called by the static methods in this class.static CelestialBodygetEarth()Get the Earth singleton body.static CelestialBodyGet the Earth-Moon barycenter singleton bodies pair.static CelestialBodyGet the Jupiter singleton body.static CelestialBodygetMars()Get the Mars singleton body.static CelestialBodyGet the Mercury singleton body.static CelestialBodygetMoon()Get the Moon singleton body.static CelestialBodyGet the Neptune singleton body.static CelestialBodygetPluto()Get the Pluto singleton body.static CelestialBodyGet the Saturn singleton body.static CelestialBodyGet the solar system barycenter aggregated body.static CelestialBodygetSun()Get the Sun singleton body.static CelestialBodyGet the Uranus singleton body.static CelestialBodygetVenus()Get the Venus singleton body.
-
Field Details
-
SOLAR_SYSTEM_BARYCENTER
Predefined name for solar system barycenter.- See Also:
-
SUN
Predefined name for Sun.- See Also:
-
MERCURY
Predefined name for Mercury.- See Also:
-
VENUS
Predefined name for Venus.- See Also:
-
EARTH_MOON
Predefined name for Earth-Moon barycenter.- See Also:
-
EARTH
Predefined name for Earth.- See Also:
-
MOON
Predefined name for Moon.- See Also:
-
MARS
Predefined name for Mars.- See Also:
-
JUPITER
Predefined name for Jupiter.- See Also:
-
SATURN
Predefined name for Saturn.- See Also:
-
URANUS
Predefined name for Uranus.- See Also:
-
NEPTUNE
Predefined name for Neptune.- See Also:
-
PLUTO
Predefined name for Pluto.- See Also:
-
-
Method Details
-
getCelestialBodies
Get the instance ofCelestialBodiesthat 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
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:
-
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:
-
clearCelestialBodyLoaders
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:
-
clearCelestialBodyLoaders
Clear loaders for all celestial bodies.Calling this method also clears all loaded celestial bodies.
- See Also:
-
clearCelestialBodyCache
Clear the specified celestial body from the internal cache.- Parameters:
name- name of the body
-
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
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
Get the Sun singleton body.- Returns:
- Sun body
-
getMercury
Get the Mercury singleton body.- Returns:
- Sun body
-
getVenus
Get the Venus singleton body.- Returns:
- Venus body
-
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
Get the Earth singleton body.- Returns:
- Earth body
-
getMoon
Get the Moon singleton body.- Returns:
- Moon body
-
getMars
Get the Mars singleton body.- Returns:
- Mars body
-
getJupiter
Get the Jupiter singleton body.- Returns:
- Jupiter body
-
getSaturn
Get the Saturn singleton body.- Returns:
- Saturn body
-
getUranus
Get the Uranus singleton body.- Returns:
- Uranus body
-
getNeptune
Get the Neptune singleton body.- Returns:
- Neptune body
-
getPluto
Get the Pluto singleton body.- Returns:
- Pluto body
-
getBody
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
-