Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.stsci.edu/~sontag/spicedocs/cspice/ckopn_c.html
Дата изменения: Sat Dec 17 06:08:35 2005 Дата индексирования: Sun Apr 10 23:23:41 2016 Кодировка: Поисковые слова: mars global surveyor |
Open a new CK file, returning the handle of the opened file.
None.
VARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- fname I The name of the CK file to be opened. ifname I The internal filename for the CK. ncomch I The number of characters to reserve for comments. handle O The handle of the opened CK file.
fname The name of the CK file to be opened. ifname The internal filename for the CK file that is being created. The internal filename may be up to 60 characters long. If you do not have any conventions for tagging your files, an internal filename of "CK_file" is perfectly acceptable. You may also leave it blank if you like. ncomch This is the space, measured in characters, to be initially set aside for the comment area when a new CK file is opened. The amount of space actually set aside may be greater than the amount requested, due to the manner in which comment records are allocated in an CK file. However, the amount of space set aside for comments will always be at least the amount that was requested. The value of ncomch should be greater than or equal to zero, i.e., 0 <= ncomch. A negative value, should one occur, will be assumed to be zero. *****NOTE: This variable is currently ignored. It is here so that it may be used in the future when the DAF comment area software has been placed into spicelib, which should happen in the near future.
handle The handle of the opened CK file. If an error occurs the value of this variable will not represent a valid handle.
None.
Open a new CK file, reserving room for comments if requested.
Suppose that you want to create a new CK file called "new.ck" that contains a single type 3 CK segment and has room for at least 5000 comment characters. The following code fragment should take care of this for you, assuming that all of the variables passed to the CK type 3 segment writer have appropriate values. fname = "new.ck"; ifname = "Test CK file"; ckopn_c ( fname, ifname, 5000, &handle ); ckw03_c ( handle, begtim, endtim, inst, ref, avflag, segid, nrec, sclkdp, quats, avvs, nints, starts ); ckcls_c ( handle );
None.
1) If the value of ncomch is negative, a value of zero will be used for the number of comment characters to be set aside for comments. 2) If an error occurs while attempting to open a CK file the value of handle will not represent a valid file handle.
See fname and handle.
N.J. Bachman (JPL) K.R. Gehringer (JPL)
None.
-CSPICE Version 1.1.0, 08-FEB-1998 (NJB) References to C2F_CreateStr_Sig were removed; code was cleaned up accordingly. String checks are now done using the macro CHKFSTR. -CSPICE Version 1.0.0, 25-OCT-1997 (NJB) Based on SPICELIB Version 1.0.0, 26-JAN-1995 (KRG)
open a new ck file