public final class SpkReader extends Object
| Modifier and Type | Method and Description |
|---|---|
static double[] |
getStateRelativeToBody(int targetID,
double epoch,
int refID,
int obsID,
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 - 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(int targetID,
double epoch,
int refID,
int obsID,
double[] lightTime)
throws PatriusException
This is based on the SPKEZR routine of the SPICE library.
target - The id of a target body. The target and observer define a state vector whose position component points
from the observer to the target.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 id 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 id of an observing body.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 statepublic 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.
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.