Function lupnt::spk_extract¶
Defined in File spice_cheby.cc
Function Documentation¶
-
segment_t *lupnt::spk_extract(char const *path, long *segs)¶
Scan through the SPK file path and extract all of the Chebyshev position-only segments, saving them in an allocated array of segment_t, which is returned. If there is an error, NULL is returned. *segs is set to the number of segments in the array. Once this is done, this array can be used by cheby_verify() and cheby_posvel() above, with no dependency on or reference to the SPICE library.
Extract all Chebyshev-position-only (Type 2) segments from an SPK file into a heap-allocated array of
segment_t, without requiring the SPICE library afterwards.Called once by
spice::LoadSpiceKernelonde440.bsp(planetary/lunar ephemeris), producing the segment table thatspice::GetBodyPosVelBasesearches (by target/center body codes) and evaluates viacheby_posvel_adfor everyspice::GetBodyPosVelcall.- Parameters:
path – SPK (
.bsp) file pathsegs – Output: number of segments in the returned array
- Returns:
Heap-allocated array of
*segssegment descriptors, ornullptron error (e.g. not a valid SPK / no Chebyshev position-only segments)