*************************************************************************
*    EPHEMERIDES OF THE MAJOR SATURNIAN SATELLITES

*    TASS1.6 by A. Vienne and L. Duriez (1995, A&A 297, 588-605)

*************************************************************************

*    e-mail: VIENNE@GAT.UNIV-LILLE1.FR
*    e-mail: DURIEZ@GAT.UNIV-LILLE1.FR

*    Positions and velocities of the satellites Mimas, Enceladus, Tethys,
*    Dione, Rhea, Titan and Iapetus referred to the center of Saturn and to 
*    the mean ecliptic and mean equinox for J2000.0 epoch

*************************************************************************
*   Installation of TASS
*   ====================

*   from the ftp server of Bureau des longitudes:

*   ftp://ftp.imcce.fr
*   and from the directory
*   /pub/misc/invited/satel_tass16

*   get the following files:

*   exampl.f   : examples of a main program which uses the subroutines and data
*   posired.f  : contains the subroutines  
*   tass16.dat : contains the series used by these subroutines

*   Type a FORTRAN program to monitor the computations. An example of
*   such a monitor is given just below with the corresponding results

*   The present version has been checked on a Risc6000/360 IBM Work Station

*************************************************************************
*   Use of TASS:
*   ===========

*   Before any use, it is necessary to call one and only one time the
*   subroutine LECSER which fixes some parameters and read all the series
*   of TASS. The parameters of LECSER are:
*
* - the name of the file which contains the series 
*   ( here:'tass16.dat')

* - an integer*4 (0: to select all terms, 1: to select only the critical 
*   terms). Here, for a correct use, this parameter MUST BE 0 (icrt=0).

*   So, it is now possible to compute the position of a satellite with
*   the subroutine POSIRED.

*   The input parameters of this subroutine are:

* - a real*8 for the julian date (not corrected for light-time)

* - an integer*4 for the number of the satellite (1: Mimas, 2: Enceladus,
*   3: Tethys, 4: Dione, 5: Rhea, 6: Titan, 8: Japetus)

*   The output parameters of this subroutine are:

* - an array of 3 real*8 for the 3 cartesian coordinates of the position
*   in astronomical unit (ua), referred to the center of Saturn and to the mean
*   Equinox and Ecliptic 2000 (E2000)

* - an array  of 3 real*8 for the 3 cartesian coordinates of the velocity
*   in astronomical unit per julian year of 365.25d (ua/y), in the same frame 
*   of reference.

*************************************************************************
*   exampl.f
*   ========

*   This program shows the use of the FORTRAN code (posired.f) and data
*   (tass16.dat) applied to an example. 

*   The results of the execution of this program must be in exampl.res
*   values for a comparison are given just below
   
*************************************************************************

      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
      CHARACTER*50 NAMEDAT

      DIMENSION XYZ(3),VXYZ(3)

c     saturnicentrique dans le systeme J2000 (DJ= date julienne)

      NAMEDAT='tass16.dat'

      ICRT=0

      CALL LECSER(NAMEDAT,ICRT)

      NECR=16
      OPEN(NECR,FILE='exampl.res')

       IS=5 
       DJ=2405824.5D0
      WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
     
       IS=2  
       DJ=2406147.5D0 
      WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
    
       IS=8
       DJ=2406216.6D0  
       WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
  
       IS=4  
       DJ=2406477.5D0
      WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
     
       IS=3 
       DJ=2409977.4D0
      WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
     
       IS=1 
       DJ=2421677.4D0
      WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
     
       IS=5  
       DJ=2432236.8D0
      WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
     
       IS=3  
       DJ=2432270.9D0 
      WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
    
       IS=6  
       DJ=2440512.6D0
      WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
     
       IS=4  
       DJ=2441257.8D0
       WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
    
       IS=1 
       DJ=2441692.3D0
      WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
     
       IS=2 
       DJ=2441699.9D0
      WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
     
       IS=8 
       DJ=2443179.7D0 
      WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
    
       IS=2 
       DJ=2444714.D00 
      WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
    
       IS=6 
       DJ=2445061.3D0 
      WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
    
       IS=1  
       DJ=2445106.3D0 
      WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
    
       IS=3 
       DJ=2445814.D00 
       WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
   
       IS=5 
       DJ=2445814.D00 
      WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
    
       IS=8 
       DJ=2445815.1D0  
      WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ
   
       IS=4 
       DJ=2445820.6D0     
      WRITE(NECR,98) IS,DJ
      CALL  POSIRED(DJ,IS,XYZ,VXYZ)
      WRITE(NECR,100)  XYZ,VXYZ

98    FORMAT(1X,I1,F11.1)
100   FORMAT(8X,3F16.12,3F13.9)

      CLOSE(NECR)

      END

      INCLUDE 'posired.f'


*************************************************************************************************
*  Results of the program of examples (with the present version TASS1.6).
*  The XYZ positions are given in ua, so the last digit coressponds to 15cm,
*  the VXYZ velocities are in ua/y, so the last digit coresponds to 150m/y.
* 
*  5  2405824.5
*            .000255016488  -.003124357779   .001600422912  1.781208363   .049114113  -.186597578
*  2  2406147.5
*           -.000317458744   .001387123315  -.000695569370 -2.613864221  -.369066453   .446037406
*  8  2406216.6
*            .002447343471   .022675031476  -.006665246397  -.671393700   .121862318   .098725209
*  4  2406477.5
*           -.001139424157   .002032365984  -.000955456204 -1.880203521  -.779545669   .590410818
*  3  2409977.4
*            .001169171755  -.001455040893   .000629464516  1.917976545  1.207348532  -.772706551
*  1  2421677.4
*           -.001198576888  -.000209825461   .000186837157   .723936877 -2.640848972  1.326181365
*  5  2432236.8
*           -.003088985614   .001606315240  -.000556845075  -.849478705 -1.363239443   .786547570
*  3  2432270.9
*            .001698565647   .000819192814  -.000569994295 -1.201733676  1.863569977  -.902946376
*  6  2440512.6
*           -.008312968003   .000590507681   .000496831020  -.019590068 -1.020463815   .529324054
*  4  2441257.8
*            .001205300980   .001916811073  -.001121879072 -1.848838100   .967081356  -.327308693
*  1  2441692.3
*            .000712578033   .000859971416  -.000531517584 -2.484251044  1.648703630  -.530043564
*  2  2441699.9
*            .000579459700  -.001333229353   .000642772742  2.478333563   .755925149  -.635459090
*  8  2443179.7
*            .011497900148   .019131194536  -.006986500915  -.586947998   .381227333   .025604377
*  2  2444714.0
*           -.001545509544  -.000227991080   .000269442851   .542236131 -2.341439652  1.174056665
*  6  2445061.3
*            .000468338437  -.007131027063   .003639972122  1.188582242   .038910632  -.135883060
*  1  2445106.3
*            .000547084626  -.000975427527   .000482000988  2.733925772  1.161445219  -.795906708
*  3  2445814.0
*            .001735637114   .000724948622  -.000583496151 -1.103876639  1.935135994  -.879143230
* 5  2445814.0
*           .002659297810  -.002133842283   .000874732902  1.164878536  1.160534785  -.711114746
* 8  2445815.1
*          -.017991225601   .016226098290  -.000297129845  -.445084401  -.467243031   .201864213
* 4  2445820.6
*          -.000815929288   .002148543858  -.001046990497 -1.990373130  -.531066556   .471414144
*************************************************************************************************

