public final class SpkReader extends Object
| Modifier and Type | Method and Description |
|---|---|
static double[] |
getStateRelativeToBody(String target,
double epoch,
String ref,
String obs,
double[] lightTime)
Return the state (position and velocity) of a target body relative to an observing body.
|
static double[] |
getStateRelativeToCenterOfMotion(int handle,
double[] descr,
double epoch,
int[] ref,
int[] center)
Return, for a specified SPK segment and time, the state (position and velocity) of the segment's target body
relative to its center of motion.
|
static void |
spkObjects(String file,
Set<Integer> ids)
Find the set of ID codes of all objects in a specified SPK file.
|
public static void spkObjects(String file, Set<Integer> ids) throws PatriusException, IOException
This method is based on the SPKOBJ routine of the SPICE library.
file - the name of an SPK fileids - w
An initialized SPICE set data structure. IDS optionally may contain a set of ID codes on input; on output,
the data already present in IDS will be combined with ID code set found for the file SPKFNM. The elements
of sets are unique; hence each ID code in IDS appears only once, even if the SPK file contains multiple
segments for that ID code.IOException - if there is a problem managing the filePatriusException - if there is problem managing or reading the filepublic static double[] getStateRelativeToBody(String target, double epoch, String ref, String obs, double[] lightTime) throws PatriusException
This is based on the SPKEZR routine of the SPICE library.
target - The name of a target body. Optionally, you may supply the integer ID code for the object as an integer
string. For example both 'MOON' and '301' are legitimate strings that indicate the moon is the target
body.epoch - The ephemeris time, expressed as seconds past J2000 TDB, at which the state of the target body relative to
the observer is to be computed. EPOCH refers to time at the observer's location.ref - The name of the reference frame relative to which the output state vector should be expressed. This may be
any frame supported by the SPICE system.obs - The name of an observing body. Optionally, you may supply the ID code of the object as an integer string.
For example, both 'EARTH' and '399' are legitimate strings to supply to indicate the observer is Earth.lightTime - The one-way light time between the observer and target in seconds.PatriusException - if there is a counter, frame retrieving or state calculation problemIOException - if there is a problem while calculating the state.public static double[] getStateRelativeToCenterOfMotion(int handle,
double[] descr,
double epoch,
int[] ref,
int[] center)
throws PatriusException
This method is based on the SPKPVN of the SPICE library. <:p>
handle - File handledescr - Segment descriptorepoch - Target epochref - (out) Target reference framecenter - (out) Center of statePatriusException - if there is a problem reading or evaluating the segmentCopyright © 2025 CNES. All rights reserved.