public class BSPEphemerisLoader extends Object implements JPLEphemerisLoader, DataLoader
This reader implements the CelestialBodyEphemerisLoader interface and develops its own loading methods.
| Modifier and Type | Class and Description |
|---|---|
static class |
BSPEphemerisLoader.SpiceJ2000ConventionEnum
PATRIUS frame used as Spice J2000: either EME2000 or ICRF.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_BSP_SUPPORTED_NAMES
Default supported files name pattern for BSP files.
|
static double |
MU_EARTH
Mu Earth.
|
static double |
MU_EARTH_MOON
Mu Earth Moon barycenter.
|
static double |
MU_JUPITER
Mu Jupiter.
|
static double |
MU_MARS
Mu Mars.
|
static double |
MU_MERCURY
Mu Mercury.
|
static double |
MU_MOON
Mu Moon.
|
static double |
MU_NEPTUNE
Mu Neptune.
|
static double |
MU_PLUTO
Mu Pluto.
|
static double |
MU_SATURN
Mu Saturn.
|
static double |
MU_SUN
Mu Sun.
|
static double |
MU_URANUS
Mu Uranus.
|
static double |
MU_VENUS
Mu Venus.
|
static AbsoluteDate |
SPICE_J2000_EPOCH
The basic spatial reference system for SPICE is the J2000 system.
|
| Constructor and Description |
|---|
BSPEphemerisLoader(String supportedNames)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addSpiceBodyMapping(Map<Integer,String> bodyCodeNameMapping)
Add complementary (body code, body name) mapping which is not included in
SPICE default mapping.
|
static void |
clearSpiceBodyMapping()
Clear the SPICE Body mapping
|
String |
getBodyLink()
Returns the BSP body name linked to PATRIUS frame tree.
|
BSPEphemerisLoader.SpiceJ2000ConventionEnum |
getConvention()
Getter for the Spice J2000 convention.
|
double |
getLoadedGravitationalCoefficient(PredefinedEphemerisType body)
Get the gravitational coefficient of a body.
|
void |
linkFramesTrees(Frame patriusFrame,
String bspBodyName)
Link a BSP IAU frame (given its name) to a PATRIUS frame.
|
CelestialBodyEphemeris |
loadCelestialBodyEphemeris(String patriusName)
Load celestial body ephemeris.
|
void |
loadData(InputStream input,
String name)
Load data from a stream.
|
void |
setSPICEJ2000Convention(BSPEphemerisLoader.SpiceJ2000ConventionEnum newConvention)
Setter for the Spice J2000 convention.
|
boolean |
stillAcceptsData()
Check if the loader still accepts new data.
|
public static final String DEFAULT_BSP_SUPPORTED_NAMES
public static final double MU_SUN
public static final double MU_MERCURY
public static final double MU_VENUS
public static final double MU_EARTH_MOON
public static final double MU_EARTH
public static final double MU_MOON
public static final double MU_MARS
public static final double MU_JUPITER
public static final double MU_SATURN
public static final double MU_URANUS
public static final double MU_NEPTUNE
public static final double MU_PLUTO
public static final AbsoluteDate SPICE_J2000_EPOCH
public BSPEphemerisLoader(String supportedNames)
supportedNames - supported namespublic CelestialBodyEphemeris loadCelestialBodyEphemeris(String patriusName) throws PatriusException
loadCelestialBodyEphemeris in interface CelestialBodyEphemerisLoaderpatriusName - body name known by PatriusPatriusException - if the body, given its name, is not in the filepublic boolean stillAcceptsData()
This method is used to speed up data loading by interrupting crawling the data sets as soon as a loader has found the data it was waiting for. For loaders that can merge data from any number of sources (for example JPL ephemerides or Earth Orientation Parameters that are split among several files), this method should always return true to make sure no data is left over.
stillAcceptsData in interface DataLoaderpublic void loadData(InputStream input, String name) throws IOException, PatriusException
loadData in interface DataLoaderinput - data input streamname - name of the file (or zip entry)IOException - if data can't be readPatriusException - if some data is missing
or if some loader specific error occurspublic double getLoadedGravitationalCoefficient(PredefinedEphemerisType body)
getLoadedGravitationalCoefficient in interface JPLEphemerisLoaderbody - body for which the gravitational coefficient is requestedpublic void setSPICEJ2000Convention(BSPEphemerisLoader.SpiceJ2000ConventionEnum newConvention)
newConvention - Spice J2000 conventionpublic BSPEphemerisLoader.SpiceJ2000ConventionEnum getConvention()
public String getBodyLink()
public void linkFramesTrees(Frame patriusFrame, String bspBodyName) throws PatriusException
For example, providing Mars ICRF frame and BSP name "MARS" will set BSP MARS body IAU frame as Mars ICRF frame.
By default, BSP ICRF and PATRIUS ICRF are linked together (they are the same frame).
patriusFrame - an existing PATRIUS framebspBodyName - a body from BSP file, its IAU frame will become the provided PATRIUS framePatriusException - if body not in filepublic static void addSpiceBodyMapping(Map<Integer,String> bodyCodeNameMapping)
Warning: this method should be called before any computation using
BSPEphemerisLoader.
SPICE body code-name mapping is defined statically and is therefore
common to all BSPEphemerisLoader.
bodyCodeNameMapping - (body code, body name) mappingpublic static void clearSpiceBodyMapping()
Copyright © 2024 CNES. All rights reserved.