| ckw04e |
|
Table of contents
Procedure
CKW04E ( CK type 04: End a segment )
SUBROUTINE CKW04E ( HANDLE, ENDTIM )
Abstract
End the type 04 CK segment currently being written to the DAF
file associated with HANDLE. See also CKW04B and CKW04E.
Required_Reading
CK
DAF
Keywords
POINTING
Declarations
IMPLICIT NONE
INTEGER HANDLE
DOUBLE PRECISION ENDTIM
Brief_I/O
VARIABLE I/O DESCRIPTION
-------- --- --------------------------------------------------
HANDLE I The handle of an CK file open for writing.
ENDTIM I The segment coverage end encoded SCLK time.
Detailed_Input
HANDLE is the file handle of an CK file that has been
opened for writing, and to which a type 4 CK segment
is being written.
ENDTIM is the encoded SCLK time for the end of the segment
coverage.
Detailed_Output
None.
The type 04 segment in the DAF file associated with HANDLE will be
ended, making the addition of the data to the file permanent.
Parameters
None.
Exceptions
1) If an error occurs while reading or writing the file
indicated by HANDLE, the error is signaled by a routine in
the call tree of this routine.
Files
See the argument HANDLE.
Particulars
This routine ends a type 4 CK segment which is being written to
the DAF file associated with HANDLE. Ending the DAF segment is a
necessary step in the process of making the data a permanent part
of the DAF file.
This routine is one of a set of three routines for creating and
adding data to type 4 CK segments. These routines are:
CKW04B: Begin a type 4 CK segment. This routine must be
called before any data may be added to a type 4
segment.
CKW04A: Add data to a type 4 CK segment. This routine may be
called any number of times after a call to CKW04B to
add type 4 records to the CK segment that was
started.
CKW04E: End a type 4 CK segment. This routine is called to
make the type 4 segment a permanent addition to the
DAF file. Once this routine is called, no further type
4 records may be added to the segment. A new segment
must be started.
A type 4 CK segment consists of coefficient sets for variable
order Chebyshev polynomials over consecutive time intervals of
a variable length. The gaps between intervals are allowed.
The Chebyshev polynomials represent individual quaternion
components q0, q1, q2 and q3 and individual angular velocities
AV1, AV2 and AV3 if they are included with the data.
The pointing data supplied to the type 4 CK writer (CKW04A)
is packed into an array as a sequence of records,
----------------------------------------------------
| Record 1 | Record 2 | .. | Record N-1 | Record N |
----------------------------------------------------
with each record in data packets has the following format.
----------------------------------------------------
| The midpoint of the approximation interval |
----------------------------------------------------
| The radius of the approximation interval |
----------------------------------------------------
| Number of coefficients for q0 |
----------------------------------------------------
| Number of coefficients for q1 |
----------------------------------------------------
| Number of coefficients for q2 |
----------------------------------------------------
| Number of coefficients for q3 |
----------------------------------------------------
| Number of coefficients for AV1 |
----------------------------------------------------
| Number of coefficients for AV2 |
----------------------------------------------------
| Number of coefficients for AV3 |
----------------------------------------------------
| q0 Cheby coefficients |
----------------------------------------------------
| q1 Cheby coefficients |
----------------------------------------------------
| q2 Cheby coefficients |
----------------------------------------------------
| q3 Cheby coefficients |
----------------------------------------------------
| AV1 Cheby coefficients (optional) |
----------------------------------------------------
| AV2 Cheby coefficients (optional) |
----------------------------------------------------
| AV3 Cheby coefficients (optional) |
----------------------------------------------------
Examples
Assume that we have:
HANDLE is the handle of an CK file opened with write
access.
SEGID is a character string of no more than 40 characters
which provides a pedigree for the data in the CK
segment we will create.
INST is the SPICE ID code for the instrument whose
pointing data is to be placed into the file.
AVFLAG angular rates flag.
REFFRM is the name of the SPICE reference frame for the
pointing data.
BEGTIM is the starting encoded SCLK time for which the
segment is valid.
ENDTIM is the ending encoded SCLK time for which the segment
is valid.
N is the number of type 4 records that we want to
put into a segment in an CK file.
NPKTS is integer array which contains the lengths of
variable size data packets
RECRDS contains N type 4 records packaged for the CK
file.
SCSTRT contains the initial encoded SC time for each of
the records contained in RECRDS, where
SCSTRT(I) < SCSTRT(I+1), I = 1, N-1
SCSTRT(1) <= FIRST, SCSTRT(N) < LAST
Then the following code fragment demonstrates how to create
a type 4 CK segment if all of the data for the segment is
available at one time.
C
C Begin the segment.
C
CALL CKW04B ( HANDLE, BEGTIM, INST, REF, AVFLAG, SEGID )
C
C Add the data to the segment all at once.
C
CALL CKW04A ( HANDLE, N, NPKTS, RECRDS, SCSTRT )
C
C End the segment, making the segment a permanent
C addition to the CK file.
C
CALL CKW04E ( HANDLE, ENDTIM )
Restrictions
1) The type 4 CK segment being closed must have been started by
the routine CKW04B, the routine which begins a type 4 CK
segment.
Literature_References
None.
Author_and_Institution
J. Diaz del Rio (ODC Space)
B.V. Semenov (JPL)
Y.K. Zaiko (JPL)
Version
SPICELIB Version 1.0.2, 02-JUN-2021 (JDR)
Edited the header to comply with NAIF standard.
SPICELIB Version 1.0.1, 18-APR-2014 (BVS)
Minor header edits.
SPICELIB Version 1.0.0, 05-MAY-1999 (YKZ) (BVS)
|
Fri Dec 31 18:36:04 2021