How to load SPICE kernels?
How to load SPICE kernels?#
Enabling SPICE computation using GFINDER.
# Import GFINDER DataStore and SPICE modules
from gfinder.datastore import DataStore
import spiceypy as spice
# Load SPICE kernels for the selected mission scenario (CREMA30)
DataStore().getMissionScenario('CREMA30').loadKernels()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[2], line 2
1 # Load SPICE kernels for the selected mission scenario (CREMA30)
----> 2 DataStore().getMissionScenario('CREMA30').loadKernels()
AttributeError: 'NoneType' object has no attribute 'loadKernels'
# Set input computation time of interest
et = spice.str2et('2029 OCT 8')
## Compute sub-spacecraft position relative to Jupiter, using SPICE
#
target = 'JUPITER'
fixref = 'IAU_JUPITER'
ABCORR = 'LT+S'
OBSRVR = 'JUICE'
spoint, trgepc, srfvec = spice.subpnt('NEAR POINT/ELLIPSOID', target, et, fixref, ABCORR, OBSRVR)
altitude = spice.vnorm(srfvec)
r, lon, lat = spice.reclat(spoint)
print([ lon*spice.dpr(), lat*spice.dpr()])
## Compute sub-spacecraft position relative to Jupiter using, GFINDER.
#
# import SubSC_Point class GFINDER geometry module
from gfinder.geometry import SubSC_Point
# Run computation
SubSC_Point({'target':'JUPITER'}).compute(et)