CSPICE_WNELMD determines whether a point is an element of a double precision window. For important details concerning this module's function, please refer to the CSPICE routine wnelmd_c.
Given: point a double precision scalar point, which may or may not be contained in one of the intervals in window. window scalar, double precision window, containing zero or more intervals. The user must create 'window' using cspice_celld. the call: boolean = cspice_wnelmd( point, window ) returns: a scalar boolean, TRUE if the input 'point' is an element of the input window---that is, if a(i) < point < b(i) - - for some interval [ a(i), b(i) ] in window---and returns FALSE otherwise.
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 three intervals. ;; darray = [ [ 1.d, 3.0], [ 7.0, 11.0], [23.0, 27.0] ] ;; ;; Add the window data to the cell. ;; for i=0, 2 do begin cspice_wninsd, darray[0,i], darray[1,i], win1 endfor test_array = [ 0.d, 1.d, 9.d, 13.d, 29.d ] for i=0, n_elements(test_array) -1 do begin if( cspice_wnelmd( test_array[i], win1) ) then begin print, test_array[i], " - an element of the window" endif else begin print, test_array[i], " - not an element of the window" endelse endfor IDL outputs: 0.0000000 - not an element of the window 1.0000000 - an element of the window 9.0000000 - an element of the window 13.000000 - not an element of the window 29.000000 - not an element of the window
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.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)
element of a d.p. window
Wed Apr 5 17:58:04 2017