org.orekit.bodies
Class JPLEphemeridesLoader

java.lang.Object
  extended by org.orekit.bodies.JPLEphemeridesLoader
All Implemented Interfaces:
CelestialBodyLoader

public class JPLEphemeridesLoader
extends Object
implements CelestialBodyLoader

Loader for JPL ephemerides binary files (DE 4xx) and similar formats (INPOP 06/08/10).

JPL ephemerides binary files contain ephemerides for all solar system planets.

The JPL ephemerides binary files are recognized thanks to their base names, which must match the pattern [lu]nx[mp]####.ddd (or [lu]nx[mp]####.ddd.gz for gzip-compressed files) where # stands for a digit character and where ddd is an ephemeris type (typically 405 or 406).

The loader supports files encoded in big-endian as well as in little-endian notation. Usually, big-endian files are named unx[mp]####.ddd, while little-endian files are named lnx[mp]####.ddd.

The IMCCE ephemerides binary files are recognized thanks to their base names, which must match the pattern inpop*.dat (or inpop*.dat.gz for gzip-compressed files) where * stands for any string.

The loader supports files encoded in big-endian as well as in little-endian notation. Usually, big-endian files contain bigendian in their names, while little-endian files contain littleendian in their names.

The loader supports files in TDB or TCB time scales.

Author:
Luc Maisonobe

Nested Class Summary
static class JPLEphemeridesLoader.EphemerisType
          List of supported ephemerides types.
 
Field Summary
static String DEFAULT_DE_SUPPORTED_NAMES
          Default supported files name pattern for JPL DE files.
static String DEFAULT_INPOP_SUPPORTED_NAMES
          Default supported files name pattern for IMCCE INPOP files.
 
Constructor Summary
JPLEphemeridesLoader(String supportedNames, JPLEphemeridesLoader.EphemerisType generateType)
          Create a loader for JPL ephemerides binary files.
 
Method Summary
 double getLoadedAstronomicalUnit()
          Get astronomical unit.
 double getLoadedConstant(String... names)
          Get a constant defined in the ephemerides headers.
 double getLoadedEarthMoonMassRatio()
          Get Earth/Moon mass ratio.
 double getLoadedGravitationalCoefficient(JPLEphemeridesLoader.EphemerisType body)
          Get the gravitational coefficient of a body.
 double getMaxChunksDuration()
          Get the maximal chunks duration.
 CelestialBody loadCelestialBody(String name)
          Load celestial body.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DE_SUPPORTED_NAMES

public static final String DEFAULT_DE_SUPPORTED_NAMES
Default supported files name pattern for JPL DE files.

See Also:
Constant Field Values

DEFAULT_INPOP_SUPPORTED_NAMES

public static final String DEFAULT_INPOP_SUPPORTED_NAMES
Default supported files name pattern for IMCCE INPOP files.

See Also:
Constant Field Values
Constructor Detail

JPLEphemeridesLoader

public JPLEphemeridesLoader(String supportedNames,
                            JPLEphemeridesLoader.EphemerisType generateType)
                     throws OrekitException
Create a loader for JPL ephemerides binary files.

Parameters:
supportedNames - regular expression for supported files names
generateType - ephemeris type to generate
Throws:
OrekitException - if the header constants cannot be read
Method Detail

loadCelestialBody

public CelestialBody loadCelestialBody(String name)
                                throws OrekitException
Load celestial body.

Specified by:
loadCelestialBody in interface CelestialBodyLoader
Parameters:
name - name of the celestial body
Returns:
loaded celestial body
Throws:
OrekitException - if the body cannot be loaded

getLoadedAstronomicalUnit

public double getLoadedAstronomicalUnit()
                                 throws OrekitException
Get astronomical unit.

Returns:
astronomical unit in meters
Throws:
OrekitException - if constants cannot be loaded

getLoadedEarthMoonMassRatio

public double getLoadedEarthMoonMassRatio()
                                   throws OrekitException
Get Earth/Moon mass ratio.

Returns:
Earth/Moon mass ratio
Throws:
OrekitException - if constants cannot be loaded

getLoadedGravitationalCoefficient

public double getLoadedGravitationalCoefficient(JPLEphemeridesLoader.EphemerisType body)
                                         throws OrekitException
Get the gravitational coefficient of a body.

Parameters:
body - body for which the gravitational coefficient is requested
Returns:
gravitational coefficient in m3/s2
Throws:
OrekitException - if constants cannot be loaded

getLoadedConstant

public double getLoadedConstant(String... names)
                         throws OrekitException
Get a constant defined in the ephemerides headers.

Note that since constants are defined in the JPL headers files, they are available as soon as one file is available, even if it doesn't match the desired central date. This is because the header must be parsed before the dates can be checked.

There are alternate names for constants since for example JPL names are different from INPOP names (Sun gravity: GMS or GM_Sun, Mercury gravity: GM4 or GM_Mar...).

Parameters:
names - alternate names of the constant
Returns:
value of the constant of NaN if the constant is not defined
Throws:
OrekitException - if constants cannot be loaded

getMaxChunksDuration

public double getMaxChunksDuration()
Get the maximal chunks duration.

Returns:
chunks maximal duration in seconds


Copyright © 2017 CNES. All Rights Reserved.