org.orekit.bodies
Class CelestialBodyFactory

java.lang.Object
  extended by org.orekit.bodies.CelestialBodyFactory

public class CelestialBodyFactory
extends Object

Factory class for bodies of the solar system.

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
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
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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)
                                          throws OrekitException
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.

Throws:
OrekitException - if the header constants cannot be read
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)
                                          throws OrekitException
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.

Throws:
OrekitException - if the header constants cannot be read
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.

Parameters:
name - name of the body
See Also:
addCelestialBodyLoader(String, CelestialBodyLoader), clearCelestialBodyLoaders()

clearCelestialBodyLoaders

public static void clearCelestialBodyLoaders()
Clear loaders for all celestial bodies.

See Also:
addCelestialBodyLoader(String, CelestialBodyLoader), clearCelestialBodyLoaders(String)

getSolarSystemBarycenter

public static CelestialBody getSolarSystemBarycenter()
                                              throws OrekitException
Get the solar system barycenter aggregated body.

Returns:
solar system barycenter aggregated body
Throws:
OrekitException - if the celestial body cannot be built

getSun

public static CelestialBody getSun()
                            throws OrekitException
Get the Sun singleton body.

Returns:
Sun body
Throws:
OrekitException - if the celestial body cannot be built

getMercury

public static CelestialBody getMercury()
                                throws OrekitException
Get the Mercury singleton body.

Returns:
Sun body
Throws:
OrekitException - if the celestial body cannot be built

getVenus

public static CelestialBody getVenus()
                              throws OrekitException
Get the Venus singleton body.

Returns:
Venus body
Throws:
OrekitException - if the celestial body cannot be built

getEarthMoonBarycenter

public static CelestialBody getEarthMoonBarycenter()
                                            throws OrekitException
Get the Earth-Moon barycenter singleton bodies pair.

Returns:
Earth-Moon barycenter bodies pair
Throws:
OrekitException - if the celestial body cannot be built

getEarth

public static CelestialBody getEarth()
                              throws OrekitException
Get the Earth singleton body.

Returns:
Earth body
Throws:
OrekitException - if the celestial body cannot be built

getMoon

public static CelestialBody getMoon()
                             throws OrekitException
Get the Moon singleton body.

Returns:
Moon body
Throws:
OrekitException - if the celestial body cannot be built

getMars

public static CelestialBody getMars()
                             throws OrekitException
Get the Mars singleton body.

Returns:
Mars body
Throws:
OrekitException - if the celestial body cannot be built

getJupiter

public static CelestialBody getJupiter()
                                throws OrekitException
Get the Jupiter singleton body.

Returns:
Jupiter body
Throws:
OrekitException - if the celestial body cannot be built

getSaturn

public static CelestialBody getSaturn()
                               throws OrekitException
Get the Saturn singleton body.

Returns:
Saturn body
Throws:
OrekitException - if the celestial body cannot be built

getUranus

public static CelestialBody getUranus()
                               throws OrekitException
Get the Uranus singleton body.

Returns:
Uranus body
Throws:
OrekitException - if the celestial body cannot be built

getNeptune

public static CelestialBody getNeptune()
                                throws OrekitException
Get the Neptune singleton body.

Returns:
Neptune body
Throws:
OrekitException - if the celestial body cannot be built

getPluto

public static CelestialBody getPluto()
                              throws OrekitException
Get the Pluto singleton body.

Returns:
Pluto body
Throws:
OrekitException - if the celestial body cannot be built

getBody

public static CelestialBody getBody(String name)
                             throws OrekitException
Get a celestial body.

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.

Parameters:
name - name of the celestial body
Returns:
celestial body
Throws:
OrekitException - if the celestial body cannot be built


Copyright © 2017 CNES. All Rights Reserved.