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

Table of contents
Abstract
I/O
Parameters
Examples
Particulars
Exceptions
Files
Restrictions
Required_Reading
Literature_References
Author_and_Institution
Version
Index_Entries


Abstract


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

I/O


   Given:

      value    scalar double precision value to use as the GF subsystem
               convergence tolerance.

               help, value
                  DOUBLE = Scalar

               This value will override the default tolerance,
               SPICE_GF_CNVTOL, defined in IcyGF.pro. Units are TDB seconds.

   the call:

      cspice_gfstol, value

   sets `value' as the convergence tolerance.

Parameters


   None.

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.

   1) 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).

      Use the meta-kernel shown below to load the required SPICE
      kernels.


         KPL/MK

         File name: gfstol_ex1.tm

         This meta-kernel is intended to support operation of SPICE
         example programs. The kernels shown here should not be
         assumed to contain adequate or correct versions of data
         required by SPICE-based user applications.

         In order for an application to use this meta-kernel, the
         kernels referenced here must be present in the user's
         current working directory.

         The names and contents of the kernels referenced
         by this meta-kernel are as follows:

            File name                     Contents
            ---------                     --------
            de408.bsp                     Planetary ephemeris covering
                                          year 14 AD
            pck00009.tpc                  Planet orientation and
                                          radii
            naif0009.tls                  Leapseconds

         \begindata

            KERNELS_TO_LOAD = ( 'de408.bsp',
                                'pck00009.tpc',
                                'naif0009.tls'  )

         \begintext

         End of meta-kernel


      Example code begins here.


      PRO gfstol_ex1

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

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

         ;;
         ;; 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

      END


      When this program was executed on a Mac/Intel/IDL8.x/64-bit
      platform, the output was:


      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
   IcyGF.pro. It may occur that a GF search run needs a different
   convergence tolerance. cspice_gfstol programmatically changes the
   tolerance used by those routines.

Exceptions


   1)  If `value' is not strictly greater-than-zero, the error
       SPICE(INVALIDTOLERANCE) is signaled by a routine in the call
       tree of this routine.

   2)  If the input argument `value' is undefined, an error is
       signaled by the IDL error handling system.

   3)  If the input argument `value' is not of the expected type, or
       it does not have the expected dimensions and size, an error is
       signaled by the Icy interface.

Files


   None.

Restrictions


   None.

Required_Reading


   ICY.REQ
   GF.REQ

Literature_References


   None.

Author_and_Institution


   J. Diaz del Rio     (ODC Space)
   E.D. Wright         (JPL)

Version


   -Icy Version 1.0.1, 31-MAY-2021 (JDR)

       Edited the header to comply with NAIF standard. Added
       example's meta-kernel.

       Added -Parameters, -Exceptions, -Files, -Restrictions,
       -Literature_References and -Author_and_Institution sections.

       Removed reference to the routine's corresponding CSPICE header from
       -Abstract section.

       Added argument's type and size information in the -I/O section.

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

Index_Entries


   change default convergence tolerance for GF routines



Fri Dec 31 18:43:05 2021