CSPICE_WNCARD returns the cardinality (current number of intervals)
of a double precision window.
For important details concerning this module's function, please refer to
the CSPICE routine wncard_c.
window a scalar double precision window containing zero or more
intervals. 'window' must be created as a window structure
via a cspice_celld call.
card = cspice_wncard( window )
card a scalar integer describing the cardinality
(current number of intervals) of the input 'window'
Any numerical results shown for this example may differ between
platforms as the results depend on the SPICE kernels used as input
and the machine specific arithmetic implementation.
The window cardinality function cspice_wncard is typically used to
process each of the intervals of a window.
;; Create a cell containing a double
;; precision 8-vector.
win1 = cspice_celld( 8 )
;; Define a window with three intervals (six values).
darray = [ [ 1.d, 3.0], [ 7.0, 11.0], [23.0, 27.0] ]
;; Insert the window data to the cell.
for i=0, 2 do begin
cspice_wninsd, darray[0,i], darray[1,i], win1
;; What's the window cardinality of 'win1'?
cardinality = cspice_wncard(win1)
;; Print the window cardinality (this out to show "3" ).
print, 'Number of intervals in the window: ', cardinality
Number of intervals in the window: 3
This function returns the value of cspice_card(window)/2.
-Icy Version 1.0.1, 23-SEP-2008, EDW (JPL)
Eliminated error in English.
Corrected typo in 'window' I/O description.
-Icy Version 1.0.0, 03-DEC-2007, EDW (JPL)
cardinality of a d.p. window