Class LazyLoadedCelestialBodies
- java.lang.Object
-
- org.orekit.bodies.LazyLoadedCelestialBodies
-
- All Implemented Interfaces:
CelestialBodies
public class LazyLoadedCelestialBodies extends Object implements CelestialBodies
This class lazily loads auxiliary data when it is needed by a requested body. It is designed to match the behavior ofCelestialBodyFactoryin Orekit 10.0.- Since:
- 10.1
- Author:
- Luc Maisonobe, Evan Ward
- See Also:
CelestialBodyFactory
-
-
Constructor Summary
Constructors Constructor Description LazyLoadedCelestialBodies(DataProvidersManager dataProvidersManager, TimeScales timeScales, Frame gcrf)Create a celestial body factory with the given auxiliary data sources.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCelestialBodyLoader(String name, CelestialBodyLoader loader)Add a loader for celestial bodies.voidaddDefaultCelestialBodyLoader(String supportedNames)Add the default loaders for all predefined celestial bodies.voidaddDefaultCelestialBodyLoader(String name, String supportedNames)Add the default loaders for celestial bodies.voidclearCelestialBodyCache()Clear all loaded celestial bodies.voidclearCelestialBodyCache(String name)Clear the specified celestial body from the internal cache.voidclearCelestialBodyLoaders()Clear loaders for all celestial bodies.voidclearCelestialBodyLoaders(String name)Clear loaders for one celestial body.CelestialBodygetBody(String name)Get a celestial body.CelestialBodygetEarth()Get the Earth singleton body.CelestialBodygetEarthMoonBarycenter()Get the Earth-Moon barycenter singleton bodies pair.CelestialBodygetJupiter()Get the Jupiter singleton body.CelestialBodygetMars()Get the Mars singleton body.CelestialBodygetMercury()Get the Mercury singleton body.CelestialBodygetMoon()Get the Moon singleton body.CelestialBodygetNeptune()Get the Neptune singleton body.CelestialBodygetPluto()Get the Pluto singleton body.CelestialBodygetSaturn()Get the Saturn singleton body.CelestialBodygetSolarSystemBarycenter()Get the solar system barycenter aggregated body.CelestialBodygetSun()Get the Sun singleton body.CelestialBodygetUranus()Get the Uranus singleton body.CelestialBodygetVenus()Get the Venus singleton body.
-
-
-
Constructor Detail
-
LazyLoadedCelestialBodies
public LazyLoadedCelestialBodies(DataProvidersManager dataProvidersManager, TimeScales timeScales, Frame gcrf)
Create a celestial body factory with the given auxiliary data sources.- Parameters:
dataProvidersManager- supplies JPL ephemerides auxiliary data files.timeScales- set of time scales to use when loading bodies.gcrf- Earth centered frame aligned with ICRF.
-
-
Method Detail
-
addCelestialBodyLoader
public 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 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 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 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 void clearCelestialBodyLoaders()
Clear loaders for all celestial bodies.Calling this method also clears all loaded celestial bodies.
-
clearCelestialBodyCache
public void clearCelestialBodyCache(String name)
Clear the specified celestial body from the internal cache.- Parameters:
name- name of the body
-
clearCelestialBodyCache
public 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 CelestialBody getSolarSystemBarycenter()
Description copied from interface:CelestialBodiesGet the solar system barycenter aggregated body.Both the
inertially oriented frameandbody oriented framefor this aggregated body are aligned withICRF(and therefore alsoGCRF)- Specified by:
getSolarSystemBarycenterin interfaceCelestialBodies- Returns:
- solar system barycenter aggregated body
-
getSun
public CelestialBody getSun()
Description copied from interface:CelestialBodiesGet the Sun singleton body.- Specified by:
getSunin interfaceCelestialBodies- Returns:
- Sun body
-
getMercury
public CelestialBody getMercury()
Description copied from interface:CelestialBodiesGet the Mercury singleton body.- Specified by:
getMercuryin interfaceCelestialBodies- Returns:
- Sun body
-
getVenus
public CelestialBody getVenus()
Description copied from interface:CelestialBodiesGet the Venus singleton body.- Specified by:
getVenusin interfaceCelestialBodies- Returns:
- Venus body
-
getEarthMoonBarycenter
public CelestialBody getEarthMoonBarycenter()
Description copied from interface:CelestialBodiesGet the Earth-Moon barycenter singleton bodies pair.Both the
inertially oriented frameandbody oriented framefor this bodies pair are aligned withICRF(and therefore alsoGCRF)- Specified by:
getEarthMoonBarycenterin interfaceCelestialBodies- Returns:
- Earth-Moon barycenter bodies pair
-
getEarth
public CelestialBody getEarth()
Description copied from interface:CelestialBodiesGet the Earth singleton body.- Specified by:
getEarthin interfaceCelestialBodies- Returns:
- Earth body
-
getMoon
public CelestialBody getMoon()
Description copied from interface:CelestialBodiesGet the Moon singleton body.- Specified by:
getMoonin interfaceCelestialBodies- Returns:
- Moon body
-
getMars
public CelestialBody getMars()
Description copied from interface:CelestialBodiesGet the Mars singleton body.- Specified by:
getMarsin interfaceCelestialBodies- Returns:
- Mars body
-
getJupiter
public CelestialBody getJupiter()
Description copied from interface:CelestialBodiesGet the Jupiter singleton body.- Specified by:
getJupiterin interfaceCelestialBodies- Returns:
- Jupiter body
-
getSaturn
public CelestialBody getSaturn()
Description copied from interface:CelestialBodiesGet the Saturn singleton body.- Specified by:
getSaturnin interfaceCelestialBodies- Returns:
- Saturn body
-
getUranus
public CelestialBody getUranus()
Description copied from interface:CelestialBodiesGet the Uranus singleton body.- Specified by:
getUranusin interfaceCelestialBodies- Returns:
- Uranus body
-
getNeptune
public CelestialBody getNeptune()
Description copied from interface:CelestialBodiesGet the Neptune singleton body.- Specified by:
getNeptunein interfaceCelestialBodies- Returns:
- Neptune body
-
getPluto
public CelestialBody getPluto()
Description copied from interface:CelestialBodiesGet the Pluto singleton body.- Specified by:
getPlutoin interfaceCelestialBodies- Returns:
- Pluto body
-
getBody
public CelestialBody getBody(String name)
Get a celestial body. The names of the common bodies are defined as constants inCelestialBodyFactory.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.- Specified by:
getBodyin interfaceCelestialBodies- Parameters:
name- name of the celestial body- Returns:
- celestial body
-
-