Go to the documentation of this file. 1 subroutine geonav(pos,rm,coef,sun,nsta,ninc,npix,
2 * xlat,xlon,solz,sola,senz,sena)
4 c this
subroutine performs
navigation of a scanning sensor
on the
5 c surface of an ellipsoid based
on an input orbit position
vector and
7 c determining points
on the ellipsoidal surface which involves
8 c determining the intersection of the scan plan with the ellipsoid.
9 c the scan angle values are based
on the seawifs lac scan parameters,
10 c i.e., 1285 pixels centered at nadir
and 1.5835 milliradians per
11 c pixel. the scan angles navigated are determined by the scan
12 c parameters passed to the routine, i.e., the start pixel, the number
13 c of pixels
and the increment. (
for gac
data these values are 147,
14 c 248
and 4, respectively.) the reference ellipsoid is
set according
15 c to the scan intersection coefficients in the calling sequence; a
16 c useful model is an equatorial
radius of 6378.137 km.
and a
17 c
flattening factor of 1/298.257, used by both the geodetic reference
18 c system(grs) 1980
and the world geodetic system(wgs) 1984.
20 c it
then computes geometric parameters using the pixel locations
on
22 c the geocentric rotating reference frame. the outputs are arrays of
23 c geodetic latitude
and longitude, solar zenith
and azimuth
and sensor
24 c zenith
and azimuth. the azimuth angles are measured from local
25 c north toward east. flag values of 999. are returned
for any pixels
26 c whose scan angle is past the
earth's horizon.
30 c Name Type I/O Description
32 c pos(3) R*4 I Orbit Position Vector (km)
33 c rm(3,3) R*4 I Sensor Orientation Matrix
34 c coef(6) R*4 I Scan path coefficients
35 c sun(3) R*4 I Sun unit vector in geocentric rotating
37 c nsta I*4 I Scan start pixel number
40 c ninc R*4 I Pixel number increment
43 c npix I*4 I Pixels per scan (maximum value of 1285)
46 c xlat(*) R*4 O Pixel geodetic latitudes
47 c xlon(*) R*4 O Pixel geodetic longitudes
48 c solz(*) R*4 O Pixel solar zenith angles
49 c sola(*) R*4 O Pixel solar azimuth angles
50 c senz(*) R*4 O Pixel sensor zenith angles
51 c sena(*) R*4 O Pixel sensor azimuth angles
55 c CROSSP Compute cross product of two vectors
58 c Program written by: Frederick S. Patt
59 c General Sciences Corporation
62 c Modification History:
63 c Modified to correspond to paper: "Exact closed-form geolocation
64 c algorithm for Earth survey sensors", International Journal of
65 c Remote Sensing, Patt and Gregg 1993, by W. Gregg, 4/5/93.
67 c Corrected sinc (radians per pixel) to 0.0015897 correspond to measured
68 c value from SBRS data book. F. S. Patt, 9/22/97
70 c Added out-of-plane correction to look vector (first-order approximation)
71 c and updated radians per pixel value based on navigation assessment
72 c results. F. S. Patt, GSC, 12/8/97
74 real pos(3),coef(6),rm(3,3),sun(3)
75 real xlat(1),xlon(1),solz(1),sola(1),senz(1),sena(1)
76 real geovec(3),no(3),up(3),ea(3),rmtq(3)
77 real*8 pi,radeg,re,rem,f,omf2,omegae
78 real*8 sinc,elev,sinl,cosl,h
80 common /navicom/sina(1285),cosa(1285),sinl,cosl
81 common /gconst/pi,radeg,re,rem,f,omf2,omegae
82 data sinc/0.0015911d0/
85 c If first call, store array of sines and cosines of scan angles for
91 c Compute elevation (out-of-plane) angle
96 sina(i) = sin((i-643)*sinc)*cosl
97 cosa(i) = cos((i-643)*sinc)*cosl
101 c Compute correction factor for out-of-plane angle
102 h = (rm(2,1)*pos(1)+rm(2,2)*pos(2)+rm(2,3)*pos(3)/omf2)*2.d0
104 c Compute sensor-to-surface vectors for all scan angles
106 in = ninc*(i-1) + nsta
107 a = coef(1)*cosa(in)*cosa(in)+coef(2)*cosa(in)*sina(in)
108 * +coef(3)*sina(in)*sina(in)
109 b = coef(4)*cosa(in)+coef(5)*sina(in)
111 r = b*b-4.d0*c*a !begin solve quadratic equation
113 c Check for scan past edge of Earth
122 c Solve for magnitude of sensor-to-pixel vector and compute components
123 q = (-b-sqrt(r))/(2.d0*a)
125 c Add out-of-plane correction
126 q = q*(1.d0 + sinl*h/sqrt(r))
132 c Transform vector from sensor to geocentric frame
134 rmtq(j) = Qx*rm(1,j) + Qy*rm(2,j) + Qz*rm(3,j)
135 geovec(j) = rmtq(j) + pos(j)
138 c Compute geodetic latitude and longitude
139 tmp = sqrt(geovec(1)*geovec(1)+geovec(2)*geovec(2))*omf2
140 xlat(i) = radeg*atan2(geovec(3),tmp)
141 xlon(i) = radeg*atan2(geovec(2),geovec(1))
143 c Compute the local vertical, East and North unit vectors
144 uxy = geovec(1)*geovec(1)+geovec(2)*geovec(2)
145 temp = sqrt(geovec(3)*geovec(3) + omf2*omf2*uxy)
146 up(1) = omf2*geovec(1)/temp
147 up(2) = omf2*geovec(2)/temp
148 up(3) = geovec(3)/temp
149 upxy = sqrt(up(1)*up(1)+up(2)*up(2))
152 call crossp(up,ea,no)
154 c Compute components of spacecraft and sun vector in the
155 c vertical (up), North (no), and East (ea) vectors
168 sunv = sunv + sun(j)*up(j)
169 sunn = sunn + sun(j)*no(j)
170 sune = sune + sun(j)*ea(j)
173 c Compute the sensor zenith and azimuth
174 senz(i)=radeg*atan2(sqrt(sn*sn+se*se),sv)
175 c Check for zenith close to zero
176 .gt.
if (senz(i)0.05d0) then
177 sena(i) = radeg*atan2(se,sn)
181 .lt.
if (sena(i)0.d0) sena(i) = sena(i) + 360.0d0
184 c Compute the solar zenith and azimuth
185 solz(i)=radeg*atan2(sqrt(sunn*sunn+sune*sune),sunv)
186 c Check for zenith close to zero
187 .gt.
if (solz(i)0.05d0) then
188 sola(i) = radeg*atan2(sune,sunn)
192 .lt.
if (sola(i)0.d0) sola(i) = sola(i) + 360.0d0
int navigation(int32_t fileID)
float * vector(long nl, long nh)
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 $
for(i=0;i< NROOTS;i++) s[i]
this program makes no use of any feature of the SDP Toolkit that could generate such a then geolocation is calculated at that and then aggregated up to Resolved feature request Bug by adding three new int8 SDSs for each high resolution offsets between the high resolution geolocation and a bi linear interpolation extrapolation of the positions This can be used to reconstruct the high resolution geolocation Resolved Bug by delaying cumulation of gflags until after validation of derived products Resolved Bug by setting Latitude and Longitude to the correct fill resolving to support Near Real Time because they may be unnecessary if use of entrained ephemeris and attitude data is turned on(as it will be in Near-Real-Time processing).