SPK2OEM is one of many of SPICE tools available here:
I am trying to extract ephemeris from one of the SPK files listed here:
So I also downloaded a leap seconds file (LSK) from here as requested, and created an input file as requested, adapting an example for MRO taken from documentation:
\begindata OBJECT_NAME = 'MRO' INPUT_SPK_FILE = 'spk_psp_rec0605_0601_1388_p-v1.bsp' OUTPUT_OEM_FILE = 'spk_psp_rec0605_0601_1388_p-v1.oem' LEAPSECONDS_FILE = '/kernels/gen/lsk/leapseconds.ker' INTERPOLATION_METHOD = 'LAGRANGE' STRING_MAPPING = ( 'J2000', 'EME2000', '<object_id>', '074' ) \begintext
But I keep getting several different errors rgardless of how I change&tune my input parameters.
So I tried the above setup file with an MRO SPK/LSK couple; I didn't get any error... but the output file contains only comments, no ephemeris data!
Can anybody help figuring out how to get human readable ephemeris for this SPK file, for dates 2020-10-20 to 2020-10-21 ? I'd need (x,y,z) coordinates of Osiris Rex spacecraft with respect to a given point on the surface of Bennu asteroid.
Does it exist any other CLI tool than SPK2OEM?
Potentially it could be extended to implement spkezr_c function, which does extacly what I need.
Procedure void spkezr_c ( ConstSpiceChar *targ, SpiceDouble et, ConstSpiceChar *ref, ConstSpiceChar *abcorr, ConstSpiceChar *obs, SpiceDouble starg, SpiceDouble *lt ) Abstract Return the state (position and velocity) of a target body relative to an observing body, optionally corrected for light time (planetary aberration) and stellar aberration.