OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
asaps.f
Go to the documentation of this file.
1  SUBROUTINE asaps(LI,MI,IPLT,ORBIN,IYR,IDAY,SEC,NSTP,CDRG,
2  * TVEC,XVEC)
3 
4 C $Header: /app/shared/RCS/irix-5.2/seawifsd/src/mops/mopsV4.1/swfnav/asaps.f,v 1.1 1995/01/17 23:02:01 seawifsd Exp seawifsd $
5 C $Log: asaps.f,v $
6 C Revision 1.1 1995/01/17 23:02:01 seawifsd
7 C Initial revision
8 C
9 
10 C This is a subroutine version of the program ASAP, obtained from COSMIC.
11 C The conversion was performed to support the filtering of SeaWiFS GPS
12 C orbit data as part of navigation. An extensive description of ASAP is
13 C provided in the original program documentation (below). Several input
14 C parameters were included as calling arguments to override the parameters;
15 C read from the file; added input values to specify time range, and output
16 C arrays to pass back the times and orbit vectors. The format of the input
17 C file was preserved to maintain compatibility with the standalone version.
18 C
19 C Calling Arguments
20 
21 C Name Type I/O Description
22 C
23 C LI I*4 I Order of gravity field model
24 C MI I*4 I Degree of gravity field model
25 C IPLT I*4 I =1, write results to ASCII output files
26 C ORBIN(6) I*4 I Initial orbital elements (type of elements
27 C is assumed to be determined by IORB in
28 C parameter file; 1=mean, 0=osculating
29 C IYR I*4 I Orbital element epoch year
30 C IDAY I*4 I Orbital element epoch day-of-year
31 C SEC R*8 I Orbital element epoch seconds-of-day
32 C NSTP I*4 I Number of vectors requested (interval is
33 C specified by STEP in parameter file)
34 C CDRG R*8 I Atmospheric drag coefficient
35 C TVEC(*) R*8 O Time tags (offsets from sart of epoch day in seconds)
36 C XVEC(6,*) R*8 O Orbit vectors
37 
38 C Conversion performed by Frederick S. Patt, GSC, 20 Dec 93.
39 
40 C Modified to add error return code for call to kozsak2. F.S. Patt, GSC,
41 C October 16, 1994.
42 
43 C Cleaned up code based on suggestions from Tiger Cheng. F.S. Patt, GSC,
44 C August 15, 1994.
45 
46 C Changed TIME common block name to TIMECMN, to eliminate linker
47 C linker warnings. B. A. Franz, GSC, November 14, 1997.
48 
49 C PROGRAM ASAP
50 C VERSION 2.03 - 4/18/88
51 C PURPOSE
52 C MAIN DRIVER FOR THE ARTIFICIAL SATELLITE ANALYSIS PROGRAM (ASAP).
53 C ASAP IS AN EPHEMERIS PROPAGATION PROGRAM FOR ORBITING PLANETARY
54 C SPACECRAFTS. IT USES COWELL'S METHOD OF SPECIAL PERTURBATION. IT
55 C INCLUDES HARMONICS OF UP TO 40X40 FIELD, LUNI-SOLAR GRAVITY, DRAG,
56 C AND SOLAR RADIATION PRESSURE. IT USES A RUNGE-KUTTA 8TH ORDER
57 C METHOD WITH STEP SIZE CONTROL FOR NUMERICAL INTEGRATION. THE
58 C PROGRAM IS IN MODULAR FORM SO THAT USERS CAN MODIFY IT TO INCLUDE
59 C DIFFERENT I/O MODULES, OR DENSITY MODELS, OR DIFFERENT INTEGRATORS,
60 C ETC. IT ASSUMES A PLANET MEAN EQUATOR OF EPOCH SYSTEM AND IGNORES
61 C POLAR MOTION. ALL INPUTS ARE EITHER I30 FOR INTEGERS OR D30. FOR
62 C DOUBLE PRECISION WITH ONE VALUE TO EACH RECORD. THE VALUE MUST BE
63 C PLACED WITHIN THE FIRST 30 COLUMNS BUT THERE IS NO NEED TO RIGHT
64 C JUSTIFY. COLUMNS 31 TO 80 CAN BE USED FOR COMMENTS. THE EXCEPTION
65 C IS THE INPUT OF THE SPHERICAL HARMONIC COEFFICIENTS. THIS PROGRAM
66 C AND ITS DOCUMENTATION ARE AVAILABLE FROM COSMIC, CAT. #NPO-16731.
67 C THERE IS A COMPANION PROGRAM CALLED LONG-TERM PREDICTION (LOP) THAT
68 C USES AN AVERAGING METHOD. LOP IS AVAILABLE FROM COSMIC, CAT.
69 C #NPO-17052.
70 C INPUT
71 C L = DEGREE OF GRAVITY HARMONICS TO BE INCLUDED
72 C M = ORDER OF GRAVITY HARMONICS TO BE INCLUDED. MAXIMUM FOR L
73 C AND M IS 40. L CAN BE BIGGER THAN M.
74 C IRES = AN OPTION TO ONLY INCLUDE TESSERALS OF ORDER IRES. CAN BE
75 C USED TO STUDY RESONANCE EFFECTS WHEREBY NON-RESONANT
76 C TERRESALS ARE NOT INCLUDED IN THE CALCULATION AND THUS
77 C CUTTING PROPAGATION TIME. DOES NOT AFFECT ZONAL TERMS.
78 C = 0, TO TURN OFF THE OPTION.
79 C ISUN = 0, NO SOLAR GRAVITY
80 C = 1, WITH SOLAR GRAVITY
81 C IMOON = 0, NO LUNAR GRAVITY
82 C = 1, WITH LUNAR GRAVITY
83 C IEPHEM = 0, USE TWO-BODY EPHEMERIDES FOR SUN AND MOON
84 C = 1, FOR EARTH ORBITING SPACECRAFT ONLY, USE BUILT-IN
85 C LUNI-SOLAR EPHEMERIDES. MUST USE EARTH MEAN EQUATOR
86 C AND EQUINOX OF EPOCH SYSTEM
87 C IDRAG = 0, NO DRAG
88 C = 1, WITH DRAG
89 C IDENS = 0, USE EXPONENTIAL MODEL
90 C = 1, USE STATIC 1977 EARTH MODEL
91 C ISRP = 0, NO SOLAR RADIATION PRESSURE
92 C = 1, WITH SOLAR RADIATION PRESSURE
93 C IORB FLAG FOR INPUTING EITHER MEAN OR OSCULATING ORBITAL
94 C ELEMENTS. USES THE VALUE OF C20 TO COMPUTE SHORT PERIOD
95 C EFFECTS
96 C = 0, INPUT ORBITAL ELEMENTS ORB ARE OSCULATING VALUES
97 C = 1, INPUT ORBITAL ELEMENTS ORB ARE MEAN VALUES
98 C IPRINT = 0, PRINT AT CONSTANT STEP AS SPECIFIED BY STEP
99 C = 1, ALSO PRINT AT PERIAPSIS AND APOAPSIS
100 C INODE = 0, NO NODAL CROSSING PRINT
101 C = 1, NODAL CROSSING TIME AND INFO PRINT
102 C IPLOT = 0, NO OUTPUT ASCII FILE FOR PLOTTING
103 C = 1, WRITE OUTPUT AT EVERY 'STEP', APSIS AND NODAL CROSSINGS
104 C TO FILE 8
105 C ORB OSCULATING OR MEAN ORBITAL ELEMENTS OF THE SPACECRAFT AT
106 C TINT. SEE IORB
107 C (1) = A, SEMI-MAJOR AXIS (KM)
108 C (2) = E, ECCENTRICITY
109 C (3) = I, INCLINATION (DEG)
110 C (4) = CAPW, LONGITUDE OF ASCENDING NODE (DEG)
111 C (5) = W, ARGUMENT OF PERIAPSIS (DEG)
112 C (6) = M, MEAN ANOMALY (DEG)
113 C RELERR = RELATIVE ACCURACY OF THE INTEGRATOR. RECOMMENDED VALUES
114 C BETWEEN 1.D-6 TO 1.D-12
115 C ABSERR = ABSOLUTE ACCURACY OF THE INTEGRATOR. RECOMMENDED VALUES
116 C BETWEEN 1.D-6 TO 1.D-12
117 C STEP = TIME STEP TO PRINT (SEC).
118 C TINT(1)= INITIAL CALENDAR DATE OF RUN (YYYYMMDD.). FOR EXAMPLE,
119 C 19880726.D0, FOR 26 JULY 1988. ALL TIME USED IN THIS
120 C PROGRAM ASSUMES EPHEMERIS TIME AND NOT UNIVERSAL TIME.
121 C (2)= INITIAL TIME OF DAY OF RUN (HHMMSS.SS...D0). FOR EXAMPLE,
122 C 130723.1234D0, FOR 13 HR 7 MIN 23.1234 SEC
123 C TFIN = SAME AS TINT EXCEPT FOR END OF RUN
124 C TREF = SAME AS TINT EXCEPT THIS IS THE TIME CORRESPONDING TO THE
125 C POSITION OF THE LUNI-SOLAR EPHEMERIDES (ES AND EM) AND THE
126 C PRIME MERIDIAN (PM) INPUT. IF IEPHEM=1 TO USE BUILT-IN
127 C LUNI-SOLAR EPHEMERIDES, THEN THIS IS THE TIME
128 C CORRESPONDING TO THE PRIME MERIDIAN INPUT ONLY
129 C GE = PRODUCT OF GRAVITATIONAL CONSTANT AND MASS OF PLANET
130 C (KM**3/SEC**2). RECOMMENDED VALUES (JPL DE118),
131 C = 3.9860045D5, FOR EARTH
132 C = 3.2485877D5, FOR VENUS
133 C = 4.2828287D4, FOR MARS
134 C RE = RADIUS OF PLANET (KM). RECOMMENDED VALUES (IAU 1982),
135 C = 6378.140D0, FOR EARTH
136 C = 6051.D0, FOR VENUS
137 C = 3393.4D0, FOR MARS
138 C RATE = ROTATION RATE OF THE PLANET (DEG/SEC). RECOMMENDED VALUES
139 C (IAU 1982),
140 C = 4.178074216D-3, FOR EARTH
141 C = -1.71460706D-5, FOR VENUS
142 C = 4.061249803D-3, FOR MARS
143 C PM = LOCATION OF THE PRIME MERIDIAN RELATIVE TO THE INERTIAL
144 C X-AXIS AT TREF (DEG).
145 C ELLIP = ELLIPTICITY OF THE REFERENCE ELLIPSOID. USED BY DRAG
146 C TO COMPUTE GEODETIC ALTITUDE FOR ATMOSPHERE DENSITY
147 C EVALUATION AND BY OUTPUT ROUTINE TO COMPUTE GEODETIC
148 C ALTITUDE. RECOMMENDED VALUES (IAU 1982),
149 C = 0.D0, TO USE A SPHERE
150 C = .8182D-1, FOR EARTH
151 C = 0.D0, FOR VENUS
152 C = .1017D0, FOR MARS
153 C RATM RADIUS OF THE PLANET INCLUDING ATMOSPHERIC BLOCKAGE (KM).
154 C IT IS USED TO COMPUTE SHADOW ENTRY AND EXIT IN SOLAR
155 C RADIATION PRESSURE COMPUTATION. RECOMMENDED VALUES,
156 C = RE+90 KM FOR VENUS, EARTH, AND MARS
157 C = RE FOR MERCURY OR THE MOON
158 C RDENS REFERENCE DENSITY AT REFERENCE HEIGHT RHT TO BE USED BY
159 C THE EXPONENTIAL DENSITY MODEL (KG/KM**3)
160 C RHT REFERENCE HEIGHT FOR THE EXPONENTIAL DENSITY MODEL (KM).
161 C USE PERIAPSIS ALTITUDE IF POSSIBLE.
162 C SHT SCALE HEIGHT OF THE EXPONENTIAL DENSITY MODEL (KM)
163 C ALTMAX MAXIMUM ALTITUDE TO INCLUDE DRAG PERTURBATION (KM)
164 C WT WEIGHT FACTOR TO BE APPLIED TO THE DENSITY, 1.D0 FOR
165 C NOMINAL, 2.D0 FOR TWICE DENSER, ETC.
166 C AREAD EFFECTIVE SPACECRAFT AREA FOR DRAG (KM**2)
167 C AREAS EFFECTIVE SPACECRAFT AREA FOR SOLAR RADIATION PRESSURE
168 C (KM**2)
169 C SCMASS EFFECTIVE SPACECRAFT MASS FOR THE LENGTH OF PROPOGATION
170 C (KG)
171 C CDRAG DRAG COEFFICIENT, RECOMMENDED VALUES BETWEEN 2.D0 TO 2.2D0
172 C CSRP SOLAR RADIATION PRESSURE CONSTANT (KG/KM-SEC**2).
173 C RECOMMENDED VALUES,
174 C = G * 4.4D-3, FOR EARTH,
175 C = G * 8.4D-3, FOR VENUS,
176 C = G * 1.9D-3, FOR MARS,
177 C WHERE G < 1 FOR TRANSLUCENT MATERIAL
178 C = 1 FOR BLACK BODY
179 C = 2 FOR PERFECTLY REFLECTIVE MATERIAL
180 C GS PRODUCT OF GRAVITATIONAL CONSTANT AND MASS OF SUN
181 C (KM**3/SEC**2). RECOMMENDED VALUE (JPL DE118),
182 C = .13271244D12
183 C ES = ORBITAL ELEMENTS OF THE SUN IN PLANET EQUATOR OF EPOCH,
184 C USED IN CALCULATING POINT MASS PERTURBATION DUE TO THE
185 C SUN AND SOLAR RADIATION PRESSURE AS WELL. SEE IEPHEM FOR
186 C BUILT-IN LUNI-SOLAR EPHEMERIDES FOR THE EARTH,
187 C (1) = SEMI-MAJOR AXIS (KM)
188 C (2) = ECCENTRICITY
189 C (3) = INCLINATION (DEG)
190 C (4) = LONGITUDE OF THE ASCENDING NODE (DEG), EQUAL TO ZERO IF
191 C X-AXIS IS EQUINOX OF EPOCH
192 C (5) = ARGUMENT OF PERIAPSIS (DEG)
193 C (6) = MEAN ANOMALY AT TREF (DEG)
194 C (7) = MEAN MOTION (DEG/SEC)
195 C GM PRODUCT OF GRAVITATIONAL CONSTANT AND MASS OF THE MOON
196 C (KM**3/SEC**2). RECOMMENDED VALUE,
197 C = .490279D4, FOR EARTH'S MOON
198 C EM AN ARRAY OF 7 ORBITAL ELEMENTS OF A MOON IN PLANET EQUATOR
199 C OF EPOCH SIMILAR TO ES. SEE IEPHEM FOR BUILT-IN
200 C LUNI-SOLAR EPHEMERIDES FOR THE EARTH.
201 C N, M, C, S
202 C DEGREE, ORDER, OF THE SPHERICAL HARMONIC COEFFICIENTS.
203 C CONTINUE TO AS MANY SPHERICAL HARMONICS AS THE FIELD
204 C REQUIRES, UP TO 40X40 FIELD. N SHOULD BE WITHIN COLUMNS
205 C 1 TO 5, M SHOULD BE WITHIN COLUMNS 6 TO 10, CNM SHOULD BE
206 C WITHIN COLUMNS 11 TO 40, AND SNM SHOULD BE WITHIN COLUMNS
207 C 41 TO 70. GRAVITY COEFFICIENTS GREATER THAN L AND M ARE
208 C NOT COMPUTED IN THE FORCE COMPUTATION. ONE MAY SET UP A
209 C 40X40 FIELD HERE ANYWAY EVEN THOUGH A SMALLER FIELD IS
210 C RUN. THE PENALTY IS LONGER DISK READ TIME.
211 C CALL SUBROUTINES
212 C JULIAN, KOZSAK, KEPLER, COORD, SETSM, SETTHD, RK78CN, POUT, RK78
213 C REFERENCES
214 C JPL EM 312/87-153, 20 APRIL 1987
215 C ANALYSIS
216 C J. H. KWOK - JPL
217 C PROGRAMMER
218 C J. H. KWOK - JPL
219 C PROGRAM MODIFICATIONS
220 C NONE
221 C COMMENTS
222 C NOTE THAT THE SPHERICAL HARMONIC COEFFICIENTS ARE STORED
223 C AS C22=C(3,3), ETC. COEFS. ARE DIMENSIONED FOR 40X40 FIELD.
224 C INPUTS ASSUME KM, SEC, KG, AND DEGREES.
225 C
226 C ALL THE UNIT CONVERSIONS SHOULD BE MADE IN THIS DRIVER
227 C PROGRAM SO THAT ALL SUBROUTINES WOULD BE CONSISTENT IN UNITS.
228 C
229  IMPLICIT DOUBLE PRECISION (a-h,o-z)
230  SAVE
231  dimension tvec(*),xvec(6,*),orbin(6)
232  dimension orb(6),y(6),x(6),x1(6)
233  dimension tint(2),tfin(2),tref(2)
234  CHARACTER*256 FILNM
235  LOGICAL FIRST
236  common/option/l,m,ires,isun,imoon,iephem,idrag,idens,isrp,iorb
237  1 ,iprint,inode,iplot
238  common/timecmn/ti,tf,tr
239  common/pltcon/ge,re,rate,pm,aj2,ellip,ratm
240  common/atmcon/rdens,rht,sht,altmax,wt
241  common/spccon/aread,areas,scmass,cdrag,csrp
242  common/suncon/gs,es(7),et(7)
243  common/muncon/gm,em(7),en(7)
244  common/harmon/c(41,41),s(41,41)
245  EXTERNAL der
246  DATA neq/6/
247  DATA dtr,dts/.1745329251994330d-1,8.64d4/
248  DATA tpi/6.283185307179586d0/
249  DATA zero/0.d0/
250  DATA hstart,hlarge/60.d0,1.d99/
251  DATA first/.true./
252  DATA sp/0/
253 C
254 C BEGIN READING INPUT DATA. THIS BLOCK CAN BE REPLACED
255 C IF A NAMELIST ROUTINE IS AVAILABLE
256 C
257  IF (first) THEN
258  first = .false.
259  filnm = '$ASAP_PARMS/asap_parms.dat'
260  CALL filenv(filnm,filnm)
261  OPEN(5,file=filnm,err=999)
262  END IF
263 
264  READ(5,4000)l,m,ires,isun,imoon,iephem,idrag,idens,isrp,iorb
265  1 ,iprint,inode,iplot
266  READ(5,3000)(orb(i),i=1,6),relerr,abserr,step
267  READ(5,3000)(tint(i),i=1,2),(tfin(i),i=1,2),(tref(i),i=1,2)
268  READ(5,3000)ge,re,rate,pm,ellip,ratm
269  READ(5,3000)rdens,rht,sht,altmax,wt
270  READ(5,3000)aread,areas,scmass,cdrag,csrp
271  READ(5,3000)gs,(es(i),i=1,7)
272  READ(5,3000)gm,(em(i),i=1,7)
273 C
274 C BEGIN OUTPUT INPUT DATA
275 C
276 C WRITE(*,4000)L,M,IRES,ISUN,IMOON,IEPHEM,IDRAG,IDENS,ISRP,IORB
277 C 1 ,IPRINT,INODE,IPLOT
278 C WRITE(*,3000)(ORB(I),I=1,6),RELERR,ABSERR,STEP
279 C WRITE(*,3000)TINT,TFIN,TREF
280 C WRITE(*,3000)GE,RE,RATE,PM,ELLIP,RATM
281 C WRITE(*,3000)RDENS,RHT,SHT,ALTMAX,WT
282 C WRITE(*,3000)AREAD,AREAS,SCMASS,CDRAG,CSRP
283 C WRITE(*,3000)GS,(ES(I),I=1,7)
284 C WRITE(*,3000)GM,(EM(I),I=1,7)
285 C
286 C INPUT AND OUTPUT GRAVITY FIELD
287 C
288  DO 10 i=1,41
289  DO 10 j=1,41
290  c(i,j)=zero
291  10 s(i,j)=zero
292  DO 20 n=1,2000
293  READ(5,5000,END=30)I,J,C(I+1,J+1),S(I+1,J+1)
294  20 CONTINUE
295  30 CONTINUE
296  rewind(5)
297 C CLOSE (5)
298 C END IF
299 
300 C Replace values with calling arguments
301  l = li
302  m = mi
303  iplot = iplt
304  cdrag = cdrg
305  DO i=1,6
306  orb(i) = orbin(i)
307  END DO
308  print *,'ASAPS:',l,m,cdrag
309  print *,orb
310 C
311 
312 C IF (L.EQ.0.AND.M.EQ.0) GO TO 50
313 C DO 40 I=2,L
314 C DO 40 J=0,I
315 C IF (J.GT.M) GO TO 40
316 C WRITE(*,5000)I,J,C(I+1,J+1),S(I+1,J+1)
317 C 40 CONTINUE
318 C 50 CONTINUE
319  aj2=-c(3,1)
320  IF (ires.EQ.0) ires=1
321 C
322 C CONVERT CALENDAR DATE AND TIME TO JULIAN DATE
323 C
324 C TINT and TFIN are not used in subroutine version
325 C CALL JULIAN(TINT,TID)
326 C CALL JULIAN(TFIN,TFD)
327  tid = jd(iyr,1,iday) + sec/dts - 0.5d0
328  tfd = tid + step*(nstp-1)/dts
329  CALL julian(tref,trd)
330  WRITE(*,6000)tid,tfd,trd
331 C
332 C CONVERT START CALENDAR DATE TO FLOATING POINT DAY-OF-YEAR
333  tdy = iday + sec/dts
334 C
335 C UNIT CONVERSION FROM DEG TO RADIAN AND DAY TO SECONDS
336 C
337  pm=pm*dtr
338  rate=rate*dtr
339  DO 60 i=3,6
340  orb(i)=orb(i)*dtr
341  es(i)=es(i)*dtr
342  em(i)=em(i)*dtr
343  60 CONTINUE
344  es(7)=es(7)*dtr
345  em(7)=em(7)*dtr
346  ti=tid*dts
347  tf=ti+step*(nstp-1)
348 C TF=TFD*DTS
349  tr=trd*dts
350 C
351 C CONVERT MEAN ELEMENTS TO OSCULATING ELEMENTS IF NECESSARY
352 C
353  IF (iorb.EQ.1) THEN
354  CALL kozsak2(1,ge,re,aj2,orb,x,x1,ier)
355  DO 70 i=1,neq
356  x1(i) = orb(i)
357  70 orb(i)=x(i)
358  ENDIF
359 C
360 C CHANGE INPUT ORBITAL ELEMENTS TO CARTESIAN COORDINATES
361 C
362  DO 80 i=1,neq
363  80 y(i)=orb(i)
364  CALL kepler(y(6),y(2),ea,se,ce)
365  y(6)=ea
366  CALL coord(y,ge,x)
367 C
368 C SET UP ROTATIONAL MATRIX FOR ANALYTICAL EPHEMERIDES FOR THE SUN
369 C AND THE MOON. BESIDES SUN AND SRP, SETSUN IS REQUIRED FOR MOON
370 C PERTURBATION BECAUSE THE ECLIPTIC ANGLE IS NEEDED FOR TRANSFORMATION
371 C FROM EMO OF DATE TO EME OF DATE
372 C
373  IF (iephem.EQ.1) THEN
374  CALL setsun(ti,es)
375  ENDIF
376  IF (isun.EQ.1.OR.isrp.EQ.1) CALL setthd(es,et)
377  IF (imoon.EQ.1.AND.iephem.EQ.0) CALL setthd(em,en)
378 C
379 C SET UP INTEGRATOR PARAMETERS
380 C
381  h=hstart
382  t=ti
383  ivec = 1
384  CALL rk78cn
385 C
386 C SET UP PLOTTING FILE
387 C
388  IF (iplot.EQ.1) THEN
389  OPEN (8,file='8')
390  OPEN (9,file='9')
391  WRITE (9,2000) iyr,tdy
392  END IF
393 C
394 C THIS IS SET UP TO PRINT AT FIXED STEP INTERVALS, SEE SP EXPLANATION
395 C IF YOU WANT TO DO ADVANCE PROGRAMMING
396 C
397  500 CONTINUE
398  IF (iplot.EQ.1) CALL pout(t,x,9)
399  tvec(ivec) = t - ti + sec
400  DO i=1,6
401  xvec(i,ivec) = x(i)
402  END DO
403  tout=t+step
404  ivec = ivec + 1
405  CALL rk78(der,t,tout,neq,x,h,relerr,abserr,sp)
406 
407  IF (tout.GE.tf) GO TO 900
408  GO TO 500
409  900 CONTINUE
410  IF (iplot.EQ.1) CALL pout(t,x,9)
411  tvec(ivec) = t - ti + sec
412  DO i=1,6
413  xvec(i,ivec) = x(i)
414  END DO
415 C IF (IORB.EQ.1) THEN
416 C CONVERT FINAL VECTOR TO MEAN ELEMENTS FOR OUTPUT
417 C CALL EQNOX(X,GE,Y1)
418 C X(1) = Y1(1)
419 C DO I=2,6
420 C X(I) = Y1(I+5)
421 C END DO
422 C X1(6) = X(5)+X(6)-X1(5)
423 C X1(6) = DMOD(X1(6),TPI)
424 C CALL KOZSAK2(3,GE,RE,AJ2,X,ORB,X1)
425 C DO I=3,6
426 C ORB(I) = ORB(I)/DTR
427 C END DO
428 C WRITE (8,*) ORB
429 C END IF
430  2000 FORMAT(i10,f14.8)
431  3000 FORMAT(bn,d30.16)
432  4000 FORMAT(bn,i5)
433  5000 FORMAT(bn,2i5,2d30.16)
434  6000 FORMAT(1h1,/
435  1 ,5x,'RUN STARTS ON JULIAN DATE = ',d25.16,/
436  2 ,5x,'RUN ENDS ON JULIAN DATE = ',d25.16,/
437  3 ,5x,'REFERENCE JULIAN DATE OF PM AND EPHEM = ',d25.16)
438  IF (iplot.EQ.1) THEN
439  OPEN (8,file='8')
440  OPEN (9,file='9')
441  END IF
442  RETURN
443  999 print *,'ERROR OPENING FILE 5'
444  RETURN
445  END
446 
447 
448 
449 
subroutine kozsak2(IFLAG, GE, RE, AJ2, X, XN, XI, IER)
Definition: kozsak2.f:2
subroutine setsun(T, ES)
Definition: setsun.f:2
subroutine filenv(infil, outfil)
Definition: filenv.f:2
subroutine asaps(LI, MI, IPLT, ORBIN, IYR, IDAY, SEC, NSTP, CDRG, TVEC, XVEC)
Definition: asaps.f:3
subroutine kepler(AM, E, EA, SE, CE)
Definition: kepler.f:2
#define re
Definition: l1_czcs_hdf.c:701
Definition: jd.py:1
subroutine rk78cn
Definition: rk78cn.f:2
subroutine pout(T, X, LUN)
Definition: pout.f:2
Definition: dataday.h:40
integer function julian(DAY, MONTH, YEAR)
Definition: julian.f:2
subroutine rk78(DER, T, TOUT, N, X, H, RELERR, ABSERR, SP)
Definition: rk78.f:2
subroutine der(T, X, DX)
Definition: der.f:2
subroutine setthd(X, Y)
Definition: setthd.f:2