52 #include "nav_cnst.fin"
53 #include "navctl_s.fin"
56 integer*4 nling, nlinl, iret, amode, prod_id, sfend, i
57 integer*4 msecg(maxlin), msecl(maxlin), msecday, maxret
58 integer*4 igday, ilday
59 real*4 posg(3,maxlin), posl(3,maxlin), tilt(maxlin)
60 real*4 attg(3,maxlin), attl(3,maxlin), coef(6,maxlin)
61 real*4 attxfm(3,3), smat(3,3,maxlin)
62 character*80 lacfile, gacfile
63 data msecday/86400000/
72 write (*,*)
'Error reading navctl.dat'
77 call getarg(1,lacfile)
78 write( 6, 300 ) lacfile
79 300
format(
' interp_nav.f: LAC file =',/,a,/ )
82 call getarg(2,gacfile)
83 write( 6, 301 ) gacfile
84 301
format(
' interp_nav.f: GAC file =',/,a,/ )
88 call get_l1a_open( gacfile, amode, prod_id, igday, nling, iret )
91 write(*,*)
'Error opening GAC file'
96 call get_l1a_data( prod_id, nling, msecg, posg, smat, attg,
100 write(*,*)
'Error reading GAC'
105 iret = sfend(prod_id)
109 call get_l1a_open( lacfile, amode, prod_id, ilday, nlinl, iret )
112 write(*,*)
'Error opening LAC file'
117 call get_l1a_data( prod_id, nlinl, msecl, posl, smat, attl,
121 write(*,*)
'Error reading LAC file'
126 if ( (ilday-igday) .eq. 1 )
then
128 msecl(i) = msecl(i) + msecday
133 call checkorb( msecl, posl, msecg, posg, nlinl, nling, iret)
135 write(*,*)
'Orbit data differences in LAC and GAC data'
146 call get_xfm( smat(1,1,i), navctl, tilt(i), attl(1,i),
150 call interp_att(msecl(i), nling, msecg, attg, attl(1,i), iret)
153 if (maxret.lt.iret) maxret = iret
159 call ellxfm( attxfm, attl(1,i), tilt(i), posl(1,i), navctl,
160 * smat(1,1,i), coef(1,i))
163 write(*,*) maxret,
' LAC lines extrapolated'
167 call put_l1a_data( prod_id, nlinl, smat, attl, coef, iret)
169 write(*,*)
'Error writing data to LAC file'
176 write(*,*)
'Error writing metadata to LAC file'
181 iret = sfend(prod_id)
184 999 iret = sfend(prod_id)
185 write(*,*)
'interp_nav exiting with error'