Go to the documentation of this file. 1 subroutine swfnav(navqc,navctl,input,nframes,orbit,nlines,
2 * navblk,tilts,xnodel,nodet)
4 c swfnav(navqc,navctl,input,nframes,orbit,nlines,navblk)
10 c name
Type i/o description
11 c -------- ---- --- -----------
12 c navqc struct i
navigation quality control parameters
13 c navctl struct i controls for processing
and sensor,
15 c input struct i input
data structure containing
16 c spacecraft id
and time, tilt,
17 c sun, magnetometer
and earth sensor
data
18 c as well as the s/c computed attitude
19 c nframes i*4 i number of
data frames in input
20 c orbit struct i structure containing processed orbit
data
21 c nlines i*4 o number of lines in the navblk structure
22 c navblk struct o processed
navigation block data
23 c for every scan line of
data
24 c tilts struct o tilt states for this scene
and tilt angle
26 c xnodel r*4 o longitude of descending
node(
degrees)
27 c nodet i*4 o time of
node crossing in milliseconds of day
29 c by: w. robinson, gsc, 19 mar 93
33 c modification history:
35 c august, 13 1993: reworked to accept input
data structure passed from
36 c frank chen
's Level 1A processing soiftware and orbit data structure
37 c generated by navigation initialization routine. Added calls to
38 c nav_tlm subroutine to fill tlm structure, and orb_interp subroutine
39 c to interpolate input orbit data to scan line times.
40 c Frederick S. Patt, GSC
42 c June 24, 1994: Added tilt structure to pass to calling routine.
43 c Frederick S. Patt, GSC
45 c July 13, 1994: Added call to get_node and orbit node parameters to
46 c pass to calling routine
47 c Frederick S. Patt, GSC
49 c October 1, 2001: Initialize navblock.nflag from input.nflag, so information
50 c about timing shift corrections can be recorded.
53 c October 30, 2007: Add warning message if nav flags are set in input.
58 #include "tlm_str.fin"
59 #include "navctl_s.fin"
60 #include "navqc_s.fin"
61 #include "navblk_s.fin"
62 #include "input_s.fin"
63 #include "orbit_s.fin"
66 type(navctl_struct) :: navctl
67 type(navqc_struct) :: navqc
68 type(navblk_struct) :: navblk(maxlin)
69 type(tlm_struct) :: tlm
70 type(input_struct) :: input(maxlin)
71 type(orbit_struct) :: orbit
72 type(tilt_states) :: tilts
74 real*4 pos(3,maxlin), vel(3,maxlin), attxfm(3,3,maxlin),
75 1 att_ang(3,maxlin), tiltpr(maxlin), xnodel
76 real*8 time(maxlin), timref(3), tnode
77 integer*4 gaclac, ntim, iret, nlines, lun, ilin, i, j, nframes,
78 1 attangfl(maxlin), tiltfl(maxlin), orbfl(maxlin), nodet,
83 c start, open a temporary data file
86 .gt.
if (navctl%lvdbug0)
87 * open( unit = lun, file = 'swfnav.out
', status = 'unknown
' )
89 c extract navigation telemetry from input structure
91 call navtlm(input,nframes,navctl,gaclac,tlm,tilts)
93 c initialize nav block flags from input flags
96 .eq.
if (gaclac 1) nper = 5
97 do ilin = 1, nper*nframes
98 iframe = (ilin-1)/nper + 1
100 navblk(ilin)%nflag(i) = input(iframe)%nflag(i)
102 .eq.
if (navblk(ilin)%nflag(1)1) failflag = .true.
105 if (failflag) print *,' navfail flag
set in input data
'
107 c pre-process time tags to line-by-line time and reference
111 call proctim2(input,nframes,navqc,time,timref,nlines,iret)
112 .eq.
if( iret 0 ) then
114 c write out the processed time data
116 write(6,100)gaclac, ntim, nlines, timref
117 100 format(' swfnav: gaclac, ntim, nlines =
',/,
118 1 3i7,//,' reference time(year, day, sec)=
',
120 .gt.
if (navctl%lvdbug0) then
121 write(lun,100)gaclac, ntim, nlines, timref
123 write(lun,200)ilin,time(ilin)
124 c write(6,200)ilin,time(ilin)
125 200 format(2x,i7,f14.4)
129 c interpolate orbit data to scan line times
131 call orb_interp(orbit,nlines,timref,time,pos,vel,orbfl)
133 c check for orbit interpolation error
135 .ne..or..ne.
if ((orbfl(1)0) (orbfl(nlines)0)) then
137 navblk(ilin)%nflag(1) = 1
138 navblk(ilin)%nflag(2) = 1
143 c find node crossing for scene
145 call get_node(nlines,timref,time,pos,vel,xnodel,tnode)
148 c compute attitude transform matrix array for the segment
150 call cmpaxm( nlines, pos, vel, attxfm )
152 .gt.
c if (navctl%lvdbug0) then
154 c write(6,300)ilin,((attxfm(i,j,ilin),i=1,3),j=1,3)
155 c write(lun,300)ilin,((attxfm(i,j,ilin),i=1,3),j=1,3)
156 c 300 format(' attitude xform
matrix for line
',i7,/,
161 c this branch will use the on-board attitude
163 .eq.
if( navctl%procatt 0 )then
165 c process S/C based pitch, roll, yaw to line-by-line data
167 print *,' swfnav: using s/c provided attitude
'
168 call sc_att(gaclac, tlm, navqc, att_ang, attangfl, iret )
170 c print out the fitted pitch, roll, yaw
172 .gt.
if (navctl%lvdbug0) then
175 500 format(//,' fitted yaw, roll, pitch follows
')
177 c write(6,400)attangfl(ilin),(att_ang(i,ilin),i=1,3)
178 write(lun,400)attangfl(ilin),(att_ang(i,ilin),i=1,3)
179 400 format(i7,3f12.7)
183 c prepare the tilt values reported
185 call tiltcomp( nlines, tlm, timref, time, gaclac, navqc,
188 c compute remaining nav block parameters
190 call scpar(nlines, attxfm, att_ang, attangfl,
191 1 timref, time, pos, tiltpr, tiltfl, navctl, navblk)
193 c this branch will use sun and earth sensor data to compute attitude
196 print *,' swfnav: determining attitude from sensor data
'
197 call attcmp( nlines, gaclac, tlm, pos, vel, timref,
198 1 time, navctl, navqc, attxfm, navblk, tiltpr, tiltfl)
201 c place any remaining data into the navigation block
204 tilts%tilt(ilin) = tiltpr(ilin)
206 navblk(ilin)%orb_vec(j) = pos(j,ilin)
212 c for bad time processing, fill correct flags in nav block
215 navblk(ilin)%nflag(1) = 1
216 navblk(ilin)%nflag(6) = 1
220 .gt.
998 if (navctl%lvdbug0) close( unit = lun )
222 c for debug - write out some of the navblk info
224 .gt.
if (navctl%lvdbug0) then
225 open(unit=lun, file = 'navblk.out
', status = 'unknown
' )
227 write(lun,600)(navblk(ilin)%orb_vec(j),j=1,3),
228 1 (navblk(ilin)%att_ang(j),j=1,3)
229 600 format(2x,3f13.4,3f13.7)
233 open(unit=lun, file = 'tilt.out
', status = 'unknown
' )
235 write (lun,*) ilin,tilts%tilt(ilin)
int navigation(int32_t fileID)
subroutine earth(pos, vel, widphse1, widphfl1, widphse2,
float ** matrix(long nrl, long nrh, long ncl, long nch)
===========================================================================V5.0.48(Terra) 03/20/2015 Changes shown below are differences from MOD_PR02 V5.0.46(Terra)============================================================================Changes noted for V6.1.20(Terra) below were also instituted for this version.============================================================================V6.1.20(Terra) 03/12/2015 Changes shown below are differences from MOD_PR02 V6.1.18(Terra)============================================================================Changes from v6.1.18 which may affect scientific output:A situation can occur in which a scan which contains sector rotated data has a telemetry value indicating the completeness of the sector rotation. This issue is caused by the timing of the instrument command to perform the sector rotation and the recording of the telemetry point that reports the status of sector rotation. In this case a scan is considered valid by L1B and pass through the calibration - reporting extremely high radiances. Operationally the TEB calibration uses a 40 scan average coefficient, so the 20 scans(one mirror side) after the sector rotation are contaminated with anomalously high radiance values. A similar timing issue appeared before the sector rotation was fixed in V6.1.2. Our analysis indicates the ‘SET_FR_ENC_DELTA’ telemetry correlates well with the sector rotation encoder position. The use of this telemetry point to determine scans that are sector rotated should fix the anomaly occured before and after the sector rotation(usually due to the lunar roll maneuver). The fix related to the sector rotation in V6.1.2 is removed in this version.============================================================================V6.1.18(Terra) 10/01/2014 Changes shown below are differences from MOD_PR02 V6.1.16(Terra)============================================================================Added doi attributes to NRT(Near-Real-Time) product.============================================================================V6.1.16(Terra) 01/27/2014 Changes shown below are differences from MOD_PR02 V6.1.14(Terra)============================================================================Migrate to SDP Toolkit 5.2.17============================================================================V6.1.14(Terra) 06/26/2012 Changes shown below are differences from MOD_PR02 V6.1.12(Terra)============================================================================Added the doi metadata to L1B product============================================================================V6.1.12(Terra) 04/25/2011 Changes shown below are differences from MOD_PR02 V6.1.8(Terra)============================================================================1. The algorithm to calculate uncertainties for reflective solar bands(RSB) is updated. The current uncertainty in L1B code includes 9 terms from prelaunch analysis. The new algorithm regroups them with the new added contributions into 5 terms:u1:the common term(AOI and time independent) and
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWITH_MPI") target_link_libraries(afrt_nc4 $
int main(int argc, char *argv[])