Index Page
cspice_gfstol
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_GFSTOL overrides the default GF convergence value used in the high
   level GF routines.

   For important details concerning this module's function, please refer to
   the CSPICE routine gfstol_c.

I/O


   Given:

      value   scalar double precision value to use as the GF subsystem
              convergence tolerance. This value will override the default
              tolerance, SPICE_GF_CNVTOL, defined in SpiceGF.h. Units are
              TDB seconds.

   the call:

      cspice_gfstol, value

   sets 'value' as the convergence tolerance.

Examples


   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.

      In 14 A.D., the Roman princeps Tiberius sent his son Drusus to subdue
      a revolt of a Roman Legion stationed in Pannonia. A Lunar eclipse
      occurred during this mission.

      Perform a search for occultation events of the sun by earth as
      observed from the Moon center. Search during the interval from
      14 A.D. SEP 1 to 14 A.D. SEP 30 (Julian).

      MAXWIN  =  100
      TIMFMT  = 'YYYY ERA MON DD HR:MN:SC.#### ::JCAL'
      TIMLEN  =  41

      ;;
      ;; Load kernels.
      ;;
      cspice_furnsh, 'standard.tm'

      ;;
      ;; Use an SPK covering year 14 AD.
      ;;
      cspice_furnsh, 'de408.bsp'

      ;;
      ;; Store the time bounds of our search interval in
      ;; the cnfine confinement window.
      ;;
      cspice_str2et, [ '14 A.D. SEP 1  00:00:00',   $
                       '14 A.D. SEP 30 00:00:00'], et

      cnfine = cspice_celld( 2 )
      cspice_wninsd, et[0], et[1], cnfine

      ;;
      ;; Select a 3-minute step. We'll ignore any occultations
      ;; lasting less than 3 minutes.
      ;;
      step    = 180.D

      occtyp  = 'any'
      front   = 'earth'
      fshape  = 'ellipsoid'
      fframe  = 'iau_earth'
      back    = 'sun'
      bshape  = 'ellipsoid'
      bframe  = 'iau_sun'
      obsrvr  = 'moon'
      abcorr  = 'lt'
      result  = cspice_celld( MAXWIN*2)

      ;;
      ;; Perform the search. 'et[0]' and 'et[1]' have values ~-6*10^10,
      ;; SPICE_GF_CNVTOL has value 10^-6, so double precision addition or
      ;; subtraction of 'et[0]' and 'et[1]' with SPICE_GF_CNVTOL returns
      ;; a result indistinguishable from 'et[0]' and 'et[1]'.
      ;;
      ;; Reduce the GF convergence tolerance by an order of magnitude
      ;; to resolve this condition.
      ;;
      cspice_gfstol, 1D-5

      cspice_gfoclt, occtyp, front,  fshape, fframe, $
                     back,   bshape, bframe,         $
                     abcorr, obsrvr, step,   cnfine, result

      ;;
      ;; List the beginning and ending points in each interval
      ;; if 'result' contains data.
      ;;
      count = cspice_wncard( result )

      if ( count eq 0 ) then begin

         print, 'Result window is empty.'

      endif else begin

         for i= 0L, (count - 1L ) do begin

            cspice_wnfetd, result, i, left, right
            cspice_timout, [left, right], TIMFMT, TIMLEN, timstr

            if ( left eq right ) then begin

               print, 'Event time: ', timstr[0]

            endif else begin

               print, 'Start time : ', timstr[0]
               print, 'Stop time  : ', timstr[1]
               print

            endelse

         endfor

      endelse

      ;;
      ;; It's always good form to unload kernels after use,
      ;; particularly in IDL due to data persistence.
      ;;
      cspice_kclear

   IDL outputs:

      Start time :   14 A.D. SEP 27 05:02:02.8250
      Stop time  :   14 A.D. SEP 27 09:33:31.6995

Particulars


   The high level GF routines (see GF.REQ for a listing) use a default
   value for the convergence tolerance, SPICE_GF_CNVTOL, defined in
   SpiceGF.h. It may occur that a GF search run needs a different
   convergence tolerance. cspice_gfstol programmatically changes the
   tolerance used by those routines.

Required Reading


   ICY.REQ
   GF.REQ

Version


   -Icy Version 1.0.0, 23-SEP-2010, EDW (JPL)

Index_Entries


   change default convergence tolerance for GF routines




Wed Apr  5 17:58:01 2017