	SUBROUTINE HYPERION(DAY,I,R)
C	SOUS PROGRAMME DE CALCUL DES COORDONNEES DIFFERENTIELLES 
C	RECTILIGNES EQUATORIALES B1950.0 DE MIMAS PAR RAPPORT A
C	LA PLANETE SATURNE
C	EN ENTREE :
C	*    DAY= DATE JULIENNE OBSERVATION EN JOUR FRACTIONNAIRE
C	*      I= INDICE DE LA THEORIE DU MOUVEMENT DU SATELLITE
C	ADOPTEE POUR CHAQUE ELEMENT ORBITAL ET PETITE VARIATION
C	        =1 J.WOLTJER(1928)
C	        =2 (Ne pas utiliser)
C	        =3 (Ne pas utiliser)
C	        =4 G.DOURNEAU (1987,"BORDEAUX1",derive de Taylor1)
C	        =5 D.B.TAYLOR 1 (1984)
C	        =6 D.B.TAYLOR 2 (1987)
C	        =7 G.DOURNEAU (1987,"BORDEAUX2",derive de Taylor2)
C	EN SORTIE :
C	*   R (K) = COORDONNEES RECTILIGNES EQUATORIALES B1950.0 
C	R(K=1,3)=DX,XY,DZ PAR RAPPORT A LA PLANETE SATURNE EN U.A. 

C	TRANSMISSIONS PAR COMMON A ETIQUETTE

C	*  COMMON/BLKHYVAL : ELEMENTS ORBITAUX D ' HYPERION

	IMPLICIT REAL*8(A-H,O-Z)
	CHARACTER*8 NOMSAT(8),NOM(8,24)
	DIMENSION EL(8,24),E0(8),AN(8),TETA0(8),GPI0(8), 
	1 EX(8), AI(8), AA(8), TETAV(8), GPIV(8),
	1 OMEG50C(8), ANGI50C(8), OMEG50V(8), ANGI50V(8), 
	1 ALTAU(8), ALPEPI(8), GPIPEPI(8), GPI2PEPI(8),  EXPEPI(8), 
	1 EX2PEPI(8), R(3), TAU0(8),TAUV(8),PEPI0(8),PEPIV(8)

	COMMON/BLKPI/PI,DPI,DEGRAD,RADEG
	COMMON/BLKDAT/DATE50,DATE2000,ANJBES
	COMMON/BLKHYVAL/E0,AN,TETA0,GPI0,EX,AI,AA,TETAV,GPIV,
	1 OMEG50C,ANGI50C,OMEG50V,ANGI50V, TAU0,TAUV,ALTAU,ALPEPI,	
	1 GPIPEPI,GPI2PEPI,EXPEPI,EX2PEPI
	COMMON/BLKTIVAL/EL6(8,24)

	EQUIVALENCE (EL(1,1),E0(1))

	DATA DS/9.538937D0/

	DATA TKI/-0.747D0    /
	DATA TKOM/-0.061D0   /
	DATA EXGPIMLS/0.00013D0/
	DATA AMS0/176.D0     /
	DATA AMSV/12.22D0    /
	DATA DLAS0/13.D0     /
	DATA AL2TAU/0.007D0  /
	DATA AL3TAU/-0.014D0 /
	DATA ALAMS/-0.013D0  /
	DATA AL2ALAS/ 0.017D0/
	DATA GPIPIMLS/ 0.07D0/
	DATA AIDL/-0.018D0   /
	DATA ALS0/86.D0/

	DATA CITE/0.018D0 /
	DATA CNTP/0.0168D0/
	DATA CAPPT/-0.00000067D0/
	DATA CAPMT/ 0.00000071D0/
	DATA CE3P / 0.000151D0/
	DATA CL2P    /-0.0098D0/
	DATA CLGPIMLS/-0.0303D0/
	DATA CGPPT/-0.2657D0/
	DATA CGPMT/-0.3573D0/
	DATA CG3P /-0.2419D0/

	TAIC   = EL6(I,6)	
	TTETA0 = EL6(I,3)
	TTETAV = EL6(I,8)
	TGPI0  = EL6(I,4)
	TGPIV  = EL6(I,9)

C	ENTREE DES NOUVELLES VALEURS DE L'INTEGRATION NUMERIQUE

	AAV   = -0.74    
	EXTAU = -0.00401
	EXPEPIMT=0.00009
	EXPEPIPT=0.00009
	ALPEPIPT=0.211
	ALPEPIMT=0.192
	GPITAU = -0.47

	DJL=(DAY-2442000.5)
	DTL= DJL / 365.2422

	IF ((I-3)*(I-6)*(I-7).EQ.0) THEN

	TETAT = (184.8 - 35.41 * DTL)*DEGRAD
	TETATP= (177.3 - 35.41 * DTL)*DEGRAD

	AAV   = -0.758767	!	(0.00003509)
	EXTAU = -0.004099
	EXPEPIPT=0.000167
	EXPEPIMT=0.000235
	ALPEPIPT=0.2275
	ALPEPIMT=0.2112
	GPITAU  = -0.4457

	END IF

	ALASV = AMSV
	ALSV  = AMSV
	DLASV = 2.*AMSV

C	Calcul de l'argument w de libration en temps julien

	TGPI1900 = TGPI0 + TGPIV * (2415020.0 - 2411368.0)/365.25
	PEPI0(I) = GPI0(I)-TGPI1900
	PEPIV(I) = GPIV(I)-TGPIV
	PEPI0(I) = DMOD(PEPI0(I),360.D0)
	IF (PEPI0(I).LT.0)PEPI0(I)=PEPI0(I)+360.

C
C Fin des datas
C

	DJ0 = DAY-2415020.0
	DT0 = ((DAY-DATE50)/ANJBES) + 50.
	DT0J= DJ0/365.25   !   Fraction d'annee julienne depuis 1900.0
	DT0B= DJ0/365.2422
	DJ1 = DAY-2411368.0
	DT1=DJ1/365.25
	DT50 = (DAY-DATE50)/36525.

	TTETA = (TTETA0+TTETAV*DT1) * DEGRAD
	DLAS = (DLAS0 + DLASV * DT0) * DEGRAD
	AMS = (AMS0 + AMSV * DT0) * DEGRAD
	ALS  = ALS0 + AMSV * DT0
	ALS  = DMOD(ALS,360.D0)
	DALAS = ( 8. + 24.44 * DT0 ) * DEGRAD
	DALAS = DMOD (DALAS,DPI)

	IF (I.EQ.6.OR.I.EQ.3)THEN	!	RECALCUL DES ELEMENTS A L'ORIGINE 1900.0

	E0(I) = 205.5033 + AN(I)*(DJL-DJ0)
	TETA0(I) = 286.72 + TETAV(I)*(DTL-DT0J)
	GPI0(I)  = 130.745 + GPIV(I)*(DTL-DT0J)
	E0(I)    = DMOD(E0(I),360.D0)
	TETA0(I) = DMOD(TETA0(I),360.D0)
	GPI0(I)  = DMOD(GPI0(I),360.D0)
	IF (E0(I).LT.0)    E0(I)    = E0(I)+360.
	IF (TETA0(I).LT.0) TETA0(I) = TETA0(I)+360.
	IF (GPI0(I).LT.0)  GPI0(I)  = GPI0(I)+360.
	PEPIV(I) = -19.2154
	TAUV(I)=0.5622087
	PEPI0(I) = 171.247 + PEPIV(I) * (DTL-DT0J)
	TAU0(I)  = 138.3959 + TAUV(I) * (2415020.0 - 2442000.5)
	PEPI0(I) = DMOD(PEPI0(I),360.D0)
	TAU0(I)  = DMOD(TAU0(I),360.D0)
	IF (PEPI0(I).LT.0)PEPI0(I) = PEPI0(I)+360.
	IF (TAU0(I).LT.0) TAU0(I)  = TAU0(I) +360.

	END IF	!	I = 6

	OMEG50 = (OMEG50C(I)+OMEG50V(I)*DT50)	*DEGRAD
	ANGI50 = (ANGI50C(I)+ANGI50V(I)*DT50)   *DEGRAD
	CALL DANNO(DATE50, DATE50, OMEG50, ANGI50, OMEG0, ANGI0, 
	1 ANGN0, ANGJ0, POMEG0, DOM0)
	TETA = (TETA0(I)+TETAV(I)*DT0J) * DEGRAD
	ANGIH = ANGI0 + (TKI + AI(I)*COS(TETA)+TAIC*COS(TTETA)
	1 +AIDL * COS(DLAS)) * DEGRAD
	B = ANGI0 + TKI *DEGRAD
	OMEGH = OMEG0 + (TKOM + AI(I) * SIN(TETA)
	1 +TAIC * SIN(TTETA)+AIDL * SIN(DLAS)) * DEGRAD/SIN(B)
	TAU = (TAU0(I) + TAUV(I) * DJ0) * DEGRAD
	PEPI = (PEPI0(I) + PEPIV(I) * DT0J) * DEGRAD
	TAU = DMOD(TAU,DPI)
	PEPI= DMOD(PEPI,DPI)
	IF (TAU .LT.0)TAU=TAU+DPI
	IF (PEPI.LT.0)PEPI=PEPI+DPI
	TAUD=TAU*RADEG
	PEPID=PEPI*RADEG
	GPIM = GPI0(I)+GPIV(I)*DT0J
	GPIM = DMOD(GPIM,360.D0)
	GPIMLS  = 2 * ( GPIM - ALS )
	GPIMLS0 = 2 * (GPI0(I) - ALS0)
	GPIMLSP = 2 * (GPIV(I) - AMSV)
	GPIMLS1 = - ( 31.9 + 61.7524 * DT0 )
	GPIMLS2 = - ( 93.5 + 61.7524 * DTL ) + 180.
	GPIMLS  = DMOD(GPIMLS ,360.D0)
	GPIMLS1 = DMOD(GPIMLS1,360.D0)
	GPIMLS2 = DMOD(GPIMLS2,360.D0)
	IF ((I-1)*(I-2)*(I-4)*(I-5).EQ.0)GPIMLS = GPIMLS1	!	Taylor 1 (1984)
	GPIMLSD = GPIMLS
	GPIMLS  = GPIMLS*DEGRAD
	AA1 = (AA(I)+AAV * COS(TAU)) *DS * DEGRAD/3600.
	EX1 = EX(I) + EXTAU * COS(TAU) + EXPEPI(I) * COS(PEPI)
	1 + EX2PEPI(I) * COS (PEPI+PEPI) + EXPEPIMT * COS(PEPI-TAU) 
	2 - EXPEPIPT * COS (PEPI+TAU)  + EXGPIMLS * COS(GPIMLS)
	DLEL= AI(I) * TAN ( B/2. ) * SIN ( TETA )

	AL1M = E0(I)+AN(I)*DJ0
	AL1 = (AL1M + ALTAU(I)*SIN(TAU) + AL2TAU*SIN(TAU+TAU)
	1 + AL3TAU*SIN(3.*TAU) + ALPEPIMT*SIN(PEPI-TAU) + ALPEPI(I)*SIN
	1 (PEPI)+ALPEPIPT*SIN(PEPI+TAU) + ALAMS*SIN(AMS) + AL2ALAS
	1 *SIN(DALAS) ) * DEGRAD
	GPI = (GPIM + GPITAU*SIN(TAU) + GPIPEPI(I)*SIN(PEPI)
	1 + GPI2PEPI(I) * SIN(PEPI+PEPI)
	1 - GPIPIMLS * SIN(GPIMLS) ) * DEGRAD
	IF ((I-3)*(I-6)*(I-7).EQ.0)THEN	!	TAYLOR 2
	ANGIH = ANGIH + (CITE * COS(TETAT )) * DEGRAD
	OMEGH = OMEGH + (CNTP * SIN(TETATP)) * DEGRAD
	AA1 = AA1 + CAPPT * COS(PEPI +TAU) + CAPMT * COS(PEPI-TAU)
	EX1 = EX1 + CE3P * COS(PEPI*3)
	AL1 = AL1 + (CL2P * SIN(PEPI+PEPI) 
	1 + CLGPIMLS * SIN(GPIMLS)) * DEGRAD
	GPI = GPI + (CGPPT * SIN(PEPI+TAU)
	1	  +  CGPMT * SIN(PEPI-TAU)
	1	  +  CG3P  * SIN(PEPI*3) ) * DEGRAD
	END IF	!	I=6 OU 7
	AL1 = DMOD(AL1, DPI)
	IF(AL1.LT.0)AL1=AL1+DPI
	GPI = DMOD(GPI, DPI)
	IF(GPI.LT.0)GPI=GPI+DPI
	ANOM = AL1-GPI
	IF(ANOM.LT.0)ANOM=ANOM+DPI

C
C Calcul de teta et gamma a partir de omega et i (N et I Taylor).
C

	CALL ECOREQAN(OMEGH,ANGIH,GPI,OMEG0,ANGI0,POMEG0,TETA,AIR,PIH)
	CALL EECR(AA1, EX1, AIR, TETA, PIH, ANOM, R)
	CALL ROTA(R, 0., -ANGJ0, -ANGN0)		
	RETURN
	END
