public class JPLHistoricEphemerisLoader extends Object implements JPLEphemerisLoader
CelestialBodyEphemeris
. For CelestialPoint
loader,
see dedicated class.
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).
Currently accepted JPL formats are: DE200/DE 202/DE 403/DE 405/DE 406/DE 410/DE 413/DE 414/DE 418/DE 421/DE 422/DE 423 and DE 430.
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.
Currently accepted IMCCE formats are: INPOP 06b/06c/08a/10a/10b/10e/13c/17a/19a.
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.
Note: the time scale isn't serialized.
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
JPLHistoricEphemerisLoader(String supportedNamesIn,
EphemerisType generateTypeIn)
Create a loader for JPL ephemerides binary files.
|
Modifier and Type | Method and Description |
---|---|
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(EphemerisType body)
Get the gravitational coefficient of a body.
|
double |
getMaxChunksDuration()
Get the maximal chunks duration.
|
CelestialBodyEphemeris |
loadCelestialBodyEphemeris(String name)
Load celestial body ephemeris.
|
static void |
setCacheSize(int days)
Set ephemeris cache size in days.
|
public static final String DEFAULT_DE_SUPPORTED_NAMES
public static final String DEFAULT_INPOP_SUPPORTED_NAMES
public JPLHistoricEphemerisLoader(String supportedNamesIn, EphemerisType generateTypeIn)
supportedNamesIn
- regular expression for supported files namesgenerateTypeIn
- ephemeris type to generatepublic CelestialBodyEphemeris loadCelestialBodyEphemeris(String name) throws PatriusException
loadCelestialBodyEphemeris
in interface CelestialBodyEphemerisLoader
name
- name of the celestial bodyPatriusException
- if the body cannot be loadedpublic double getLoadedAstronomicalUnit() throws PatriusException
PatriusException
- if constants cannot be loadedpublic double getLoadedEarthMoonMassRatio() throws PatriusException
PatriusException
- if constants cannot be loadedpublic double getLoadedGravitationalCoefficient(EphemerisType body) throws PatriusException
getLoadedGravitationalCoefficient
in interface JPLEphemerisLoader
body
- body for which the gravitational coefficient is requestedPatriusException
- if constants cannot be loadedpublic double getLoadedConstant(String... names) throws PatriusException
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...).
names
- alternate names of the constantPatriusException
- if constants cannot be loadedpublic double getMaxChunksDuration()
public static void setCacheSize(int days)
FIFTY_DAYS
.days
- number of daysCopyright © 2023 CNES. All rights reserved.