Table of contents
CSPICE_PCKUOF unloads a binary PCK file so that it will no longer be
searched by the readers.
Given:
handle the integer handle assigned to the PCK file upon loading.
help, handle
LONG = Scalar
the call:
cspice_pckuof, handle
unloads the file from the kernel system. After the unload, the
kernel system cannot access the data within the 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 binary PCK kernel specified by an integer handle, making
room to load another PCK.
cspice_pckuof, handle
2) Load a high precision PCK file for the Earth and compute the
position transformation matrix from ITRF93 to J2000 at
2000 Jan 01 12:00:00 TDB.
Use the PCK kernel below to load the required triaxial
ellipsoidal shape model and orientation data for the Earth.
earth_720101_070426.bpc
Example code begins here.
PRO pckuof_ex2
;;
;; Open the PCK for read access. This call may be replaced (as
;; recommended by NAIF) by cspice_furnsh.
;;
cspice_pcklof, 'earth_720101_070426.bpc', handle
;;
;; Find the position transformation matrix at
;;
;; 2000 Jan 01 12:00:00 TDB
;;
;; which corresponds to ephemeris time 0.
;;
cspice_pxform, 'ITRF93', 'J2000', 0.D0, xform
;;
;; Display the results.
;;
print, 'Position transformation from ITRF93 to J2000 frame:'
print
print, format='(3F20.10)', xform
;;
;; Close the PCK file. This call may be replaced (as
;; recommended by NAIF) by cspice_unload, if cspice_furnsh has
;; been used to load the file.
;;
cspice_pckuof, handle
END
When this program was executed on a Mac/Intel/IDL8.x/64-bit
platform, the output was:
Position transformation from ITRF93 to J2000 frame:
0.1769805935 0.9842143409 -0.0000251874
-0.9842143410 0.1769805928 -0.0000274792
-0.0000225878 0.0000296531 0.9999999993
3) The following example extracts the first 20 lines of the
comment area of a binary PCK, displaying the comments on
the terminal screen.
Example code begins here.
PRO pckuof_ex3
;;
;; Local parameters.
;;
LINLEN = 1001L
BUFFSZ = 20L
pcknam = ' '
read, pcknam, PROMPT = 'Enter name of PCK > '
;;
;; Open the PCK for read access. This operation could have
;; been done with cspice_dafopr.
;;
cspice_pcklof, pcknam, handle
;;
;; Extract up to 20 lines from the comment area of the
;; loaded PCK 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 PCK file. This operation could have been done
;; with cspice_dafcls.
;;
cspice_pckuof, handle
END
When this program was executed on a Mac/Intel/IDL8.x/64-bit
platform, using the hight precision PCK file for the Earth named
earth_720101_070426.bpc as input PCK file, the output was:
Enter name of PCK > earth_720101_070426.bpc
Binary "High Accuracy" Earth PCK File
======================================
Created 27-APR-2007 by NJB (NAIF/JPL)
Original file name: earth_720101_070426.bpc
Data Source
Input file: EOP file 2007_04_26_long.eop
(Copied from WWW URL
http://epic.jpl.nasa.gov/nav/eop/latest.long)
Coverage
ET Start time: 1972 JAN 01 00:00:42.183
ET Stop time: 2007 APR 26 00:01:05.185
UTC Epoch of last datum: 26-APR-2007
A PCK file is removed from consideration during a search by the
readers by a call to cspice_pckuof.
The file table entry corresponding to the file referenced by
`handle' is removed and the file is closed. Any segment table
entry which came from the specified file is also deleted.
If the file specified by `handle' is not currently loaded in the
PCK system, no action is taken.
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.
DAF.REQ
ICY.REQ
PCK.REQ
None.
J. Diaz del Rio (ODC Space)
E.D. Wright (JPL)
-Icy Version 1.0.1, 17-JUN-2021 (JDR)
Edited the header to comply with NAIF standard. Added completed
code example.
Added -Parameters, -Exceptions, -Files, -Restrictions,
-Literature_References and -Author_and_Institution sections, and
completed -Particulars section.
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.0, 16-JUN-2003 (EDW)
unload PCK file
|