Table of contents
CSPICE_PCKLOF loads a binary PCK file for use by the readers.
This routine returns the handle of the loaded file which is
used by other PCK routines to refer to the file.
Given:
fname the name of the file to be loaded.
help, fname
STRING = Scalar
the call:
cspice_pcklof, fname, handle
returns:
handle the scalar integer handle assigned to the file upon loading.
help, handle
LONG = Scalar
Other PCK routines will subsequently use this number to refer
to the file.
FTSIZE is the maximum number of pointing files that can
be loaded by cspice_pcklof at any given time for use by
the readers.
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) 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 pcklof_ex1
;;
;; 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.
;;
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
2) 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 pcklof_ex2
;;
;; 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
If there is room for a new file in the file table, cspice_pcklof creates
an entry for it, and opens the file for reading.
Also, if the file table is empty, cspice_pcklof initializes it.
1) If an attempt is made to open more DAF files than is
specified by the parameter FTSIZE in DAF system, an error
is signaled by a routine in the call tree of this routine.
2) If an attempt is made to load more files than is specified by
the parameter FTSIZE in the PCK subsystem, and if the DAF
system has room to load another file, the error
SPICE(PCKFILETABLEFULL) is signaled by a routine in the call
tree of this routine. The current setting of FTSIZE does not
allow this situation to arise: the DAF system will trap the
error before this routine has the chance.
3) This routine makes use of DAF file system routines and is
subject to all of the constraints imposed by the DAF file
system. See the DAF Required Reading daf.req or individual DAF
routines for details.
4) If the input argument `fname' is undefined, an error is
signaled by the IDL error handling system.
5) If the input argument `fname' is not of the expected type, or
it does not have the expected dimensions and size, an error is
signaled by the Icy interface.
6) If the output argument `handle' is not a named variable, an
error is signaled by the Icy interface.
A file specified by `fname', to be loaded. The file is assigned a
handle by cspice_pcklof, which will be used by other routines to refer
to it.
None.
DAF.REQ
ICY.REQ
PCK.REQ
None.
J. Diaz del Rio (ODC Space)
E.D. Wright (JPL)
-Icy Version 1.0.1, 03-NOV-2021 (JDR)
Edited 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.
Removed reference to the routine's corresponding CSPICE header from
-Abstract section.
Added arguments' type and size information in the -I/O section.
-Icy Version 1.0.0, 16-JUN-2003 (EDW)
load PCK file
|