Table of contents
CSPICE_CKUPF unloads a CK pointing file so that it will no longer be
searched by the readers.
Given:
handle the scalar integer handle assigned to the CK file upon loading.
help, handle
LONG = Scalar
the call:
cspice_ckupf, handle
removes the file from the kernel system. Data searches will not
consult the data contained in the unloaded file.
None.
Any numerical results shown for these examples may differ between
platforms as the results depend on the SPICE kernels used as input
and the machine specific arithmetic implementation.
1) Unload a CK kernel specified by an integer handle, making
room to load another CK.
cspice_ckupf, handle
2) Load a CASSINI CK file and obtain the position transformation
matrix from J2000 to the spacecraft reference frame provided
by the CK and its angular velocity vector at a given spacecraft
clock time.
Use the CK kernel below to load the CASSINI image navigated
spacecraft pointing and orientation data.
04153_04182ca_ISS.bc
In order to convert from spacecraft clock time to "ticks,"
(units of encoded SCLK) as required by cspice_ckgpav, we will need
to load as well a CASSINI SCLK.
Use the SCLK kernel below to load the CASSINI spacecraft clock
time correlation data required for the conversion between
spacecraft clock string representation and double precision
encoding of spacecraft clock counts.
cas00071.tsc
Example code begins here.
PRO ckupf_ex2
;;
;; Constants for this program:
;;
;; -- The code for the CASSINI spacecraft clock is -82.
;;
;; -- The code for CASSINI spacecraft reference frame is -82000.
;;
;; -- Tolerance: 1 second. It must be converted to "ticks"
;; (units of encoded SCLK) for input to cspice_ckgpav.
;;
;; -- The reference frame we want is J2000.
;;
SC = -82L
INST = -82000L
REF = 'J2000'
TOL = '1.0'
CK = '04153_04182ca_ISS.bc'
SCLK = 'cas00071.tsc'
sclkch = '1465644281.0'
;;
;; Load the CK for read access. This call may be replaced (as
;; recommended by NAIF) by cspice_furnsh.
;;
cspice_cklpf, CK, handle
;;
;; We need to load a CASSINI SCLK kernel to convert from
;; clock string to ticks. Although not required for
;; the CASSINI spacecraft clock, most modern spacecraft
;; clocks require a leapseconds kernel to be loaded in
;; addition to an SCLK kernel.
;;
cspice_furnsh, SCLK
;;
;; Convert tolerance from CASSINI formatted character string
;; SCLK to ticks, which are units of encoded SCLK.
;;
cspice_sctiks, SC, TOL, toltik
;;
;; cspice_ckgpav requires encoded spacecraft clock time.
;;
cspice_scencd, SC, sclkch, sclkdp
cspice_ckgpav, INST, sclkdp, toltik, REF, cmat, av, clkout, found
;;
;; Display the results.
;;
if ( found ) then begin
cspice_scdecd, SC, clkout, clkch
print, 'Requested SCLK time : ', sclkch
print, ' CASSINI SCLK time : ', clkch
print, ' J2000 to S/C frame matrix:'
print
print, format='(3F20.10)', cmat
print
print, format='(A,3F11.7)', ' Angular velocity vector :', av
endif else begin
print, 'Pointing not found for time ', sclkch
endelse
;;
;; Close the CK file. This call may be replaced (as
;; recommended by NAIF) by cspice_unload, if cspice_furnsh has
;; been used to load the file.
;;
cspice_ckupf, handle
;;
;; It's always good form to unload kernels after use,
;; particularly in IDL due to data persistence.
;;
cspice_kclear
END
When this program was executed on a Mac/Intel/IDL8.x/64-bit
platform, the output was:
Requested SCLK time : 1465644281.0
CASSINI SCLK time : 1/1465644281.171
J2000 to S/C frame matrix:
-0.3353514559 0.8643744402 0.3746948467
-0.9378874268 -0.3438519652 -0.0461844200
0.0889189272 -0.3669095980 0.9259971767
Angular velocity vector : 0.0000000 0.0000000 0.0000000
3) The following example extracts the first 20 lines of the
comment area of a CK, displaying the comments on the terminal
screen.
Example code begins here.
PRO ckupf_ex3
;;
;; Local parameters.
;;
LINLEN = 1001L
BUFFSZ = 20L
ckname = ' '
read, ckname, PROMPT = 'Enter name of CK > '
;;
;; Open the CK for read access. This operation could have
;; been done with cspice_dafopr.
;;
cspice_cklpf, ckname, handle
;;
;; Extract up to 20 lines from the comment area of the
;; loaded CK file and display them on the terminal screen.
;;
cspice_dafec, handle, BUFFSZ, LINLEN, n, buffer, done
for i=0L, n-1L do begin
print, buffer[i]
endfor
;;
;; Close the CK file. This operation could have been done
;; with cspice_dafcls.
;;
cspice_ckupf, handle
END
When this program was executed on a Mac/Intel/IDL8.x/64-bit
platform, using the Cassini CK file named 04161_04164ra.bc as
input CK file, the output was:
Enter name of CK > 04161_04164ra.bc
\beginlabel
PDS_VERSION_ID = PDS3
RECORD_TYPE = FIXED_LENGTH
RECORD_BYTES = 1024
^SPICE_KERNEL = "04161_04164ra.bc"
MISSION_NAME = "CASSINI-HUYGENS"
SPACECRAFT_NAME = "CASSINI ORBITER"
DATA_SET_ID = "CO-S/J/E/V-SPICE-6-V1.0"
KERNEL_TYPE_ID = CK
PRODUCT_ID = "04161_04164ra.bc"
PRODUCT_CREATION_TIME = 2005-06-29T21:28:09
PRODUCER_ID = "CASSINI_AACS/JPL"
MISSION_PHASE_NAME = "SCIENCE CRUISE"
PRODUCT_VERSION_TYPE = ACTUAL
PLATFORM_OR_MOUNTING_NAME = "N/A"
START_TIME = 2004-06-09T12:00:03.631
STOP_TIME = 2004-06-12T11:58:57.943
SPACECRAFT_CLOCK_START_COUNT = "1/1465475046.160"
SPACECRAFT_CLOCK_STOP_COUNT = "1/1465734182.160"
TARGET_NAME = "N/A"
Unloading a file with cspice_ckupf removes that file from consideration
by the CK readers. In doing so, it frees up space for another
file to be loaded.
NAIF recommends use of cspice_furnsh to load and cspice_unload to
respectively load then unload CK kernels.
1) Unloading a file that has not been loaded is a no-op.
No error is signaled.
2) If the input argument `handle' is undefined, an error is
signaled by the IDL error handling system.
3) If the input argument `handle' is not of the expected type, or
it does not have the expected dimensions and size, an error is
signaled by the Icy interface.
The file referred to by `handle' is unloaded.
None.
CK.REQ
DAF.REQ
ICY.REQ
None.
J. Diaz del Rio (ODC Space)
B.V. Semenov (JPL)
E.D. Wright (JPL)
-Icy Version 1.0.2, 10-AUG-2021 (JDR)
Updated the header to comply with NAIF standard. Added complete
code examples.
Added -Parameters, -Exceptions, -Files, -Restrictions,
-Literature_References and -Author_and_Institution sections, and
completed -Particulars section. Move disclaimer on NAIF's recommendation
from -I/O section to -Particulars.
Removed deprecation warning.
Removed reference to the routine's corresponding CSPICE header from
-Abstract section.
Added argument's type and size information in the -I/O section.
-Icy Version 1.0.1, 18-MAY-2010 (BVS)
Index line now states that this routine is deprecated.
-Icy Version 1.0.0, 16-JUN-2003 (EDW)
unload CK pointing file
|