CSPICE_WNEXPD expands each of the intervals of a double precision window. For important details concerning this module's function, please refer to the CSPICE routine wnexpd_c.
Given: left the scalar, double precision amount to subtract from the left endpoint of each interval in the input window. right the scalar, double precision amount to add to the right endpoint of each interval in the window. window a window containing zero or more intervals. 'window' must be created as a window structure via a cspice_celld call. the call: cspice_wnexpd, left, right, window returns: window on output, is the original window with each of its intervals expanded by 'left' units on the left and 'right' units on the right.
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. ;; ;; Create a cell containing a double ;; precision 8-vector. ;; win1 = cspice_celld( 8 ) ;; ;; Define a window with four intervals. ;; darray = [ [ 1.d, 3.0], [ 7.0, 11.0], [23.0, 27.0], [29.0, 29.0] ] ;; ;; Add the window data to the cell. ;; for i=0, 3 do begin cspice_wninsd, darray[0,i], darray[1,i], win1 endfor ;; ;; Perform the expansion. ;; left = 2.d right = 1.d cspice_wnexpd, left, right, win1 ;; ;; Calculate the number of intervals in the ;; return window 'win1'. ;; no_intervals = cspice_wncard(win1) ;; ;; Output the intervals. ;; for i= 0, (no_intervals -1 ) do begin cspice_wnfetd, win1, i, left, right print, left, right endfor IDL outputs: -1.0000000 4.0000000 5.0000000 12.000000 21.000000 30.000000
The user must create any needed window structures with cspice_celld prior to use regardless of whether the routine uses the window as input or returns it as output.
-Icy Version 1.0.2, 26-NOV-2007, EDW (JPL) Implemented use of cspice_wncard function to return window cardinality. -Icy Version 1.0.1, 12-SEP-2006, EDW (JPL) Correct Required Reading citation CELL.REQ to CELLS.REQ. -Icy Version 1.0.0, 08-AUG-2004, EDW (JPL)
expand the intervals of a d.p. window
Wed Apr 5 17:58:05 2017