CSPICE_WNRELD compares two double precision windows. For important details concerning this module's function, please refer to the CSPICE routine wnreld_c.
Given: a, b scalar, double precision windows, each of which contains zero or more intervals. The user must create 'a' and 'b' using cspice_celld. op the scalar, string comparison operator, indicating the way in which the input sets are to be compared. 'op' may be any of the following: Operator Meaning -------- ------------------------------------- "=" a = b is TRUE if a and b are equal (contain the same intervals). "<>" a <> b is TRUE if a and b are not equal. "<=" a <= b is TRUE if a is a subset of b. "<" a < b is TRUE is a is a proper subset of b. ">=" a >= b is TRUE if b is a subset of a. ">" a > b is TRUE if b is a proper subset of a. the call: boolean = cspice_wnreld( a, op, b ) returns: a scalar boolean describing the result of the comparison.
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 ) win2 = cspice_celld( 8 ) ;; ;; Define two 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 darray = [ [ 1.d, 2.0], [ 9.0, 9.0], [24.0, 27.0] ] ;; ;; Add the window data to the cell. ;; for i=0, 2 do begin cspice_wninsd, darray[0,i], darray[1,i], win2 endfor ops = [ '=', '<>', '<=', '<', '>=', '>' ] ;; ;; Loop over each operation token in 'ops', apply that ;; operation to 'win1' and 'win2'. ;; for i=0, n_elements(ops) -1 do begin if( cspice_wnreld( win1, ops[i], win2 ) ) then begin print, "Operation succeeded : ", ops[i] endif else begin print, "Operation failed : ", ops[i] endelse endfor IDL outputs: Operation failed : = Operation succeeded : <> Operation failed : <= Operation failed : < Operation succeeded : >= Operation succeeded : >
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)
compare two d.p. windows
Wed Apr 5 17:58:05 2017