OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
geovex.f
Go to the documentation of this file.
1  subroutine geovex(pos,rm,coef,sun,geovec )
2 c*******************************************************************
3 c
4 c geovex
5 c
6 c purpose: modification of geovec to get vector from earth
7 c center to the satellite subpoint
8 c
9 c
10 c parameters: (in calling order)
11 c
12 c name Type i/o description
13 c ---------- ------ --- --------------------------
14 c pos(3) r*4 i orbit position vector(km)
15 c rm(3,3) r*4 i sensor orientation matrix
16 c coef(6) r*4 i scan path coefficients
17 c sun(3) r*4 i sun unit vector in geocentric rotating
18 c reference frame
19 c geovec(3) r*4 o vector to the point
20 c
21 c
22 c modification history:
23 c programmer date description of change
24 c ---------- ---- ---------------------
25 c w. robinson 5 mar 96 original development from geovec
26 c
27 c*******************************************************************
28 c
29 c subprograms called:
30 c
31 c crossp compute cross product of two vectors
32 c
33 c*******************************************************************
34 
35  real pos(3),coef(6),rm(3,3),sun(3)
36  real xlat(1),xlon(1),solz(1),sola(1),senz(1),sena(1)
37  real geovec(3),no(3),up(3),ea(3),rmtq(3)
38  real*8 pi,radeg,re,rem,f,omf2,omegae
39  real*8 sinc
40  logical first/.true./
41  common /gconst/pi,radeg,re,rem,f,omf2,omegae
42  data sinc/0.0015835d0/
43  data ea/0.0,0.0,0.0/
44 
45 c compute sensor-to-surface vectors for the center angle
46  a = coef(1)
47  b = coef(4)
48  c = coef(6)
49  r = b*b-4.d0*c*a !begin solve quadratic equation
50 
51 c check for scan past edge of earth
52  if (r.lt.0.) then
53  do j = 1, 3
54  geovec(j) = 999.
55  end do
56  else
57 c solve for magnitude of sensor-to-pixel vector and compute components
58  q = (-b-sqrt(r))/(2.d0*a)
59  qx = q
60 
61 c transform vector from sensor to geocentric frame
62  do j=1,3
63  rmtq(j) = qx*rm(1,j)
64  geovec(j) = rmtq(j) + pos(j)
65  end do
66  end if
67 
68  return
69  end
float * vector(long nl, long nh)
Definition: nrutil.c:15
subroutine geovex(pos, rm, coef, sun, geovec)
Definition: geovex.f:2
subroutine earth(pos, vel, widphse1, widphfl1, widphse2,
Definition: earth.f:2
float ** matrix(long nrl, long nrh, long ncl, long nch)
Definition: nrutil.c:60
#define real
Definition: DbAlgOcean.cpp:26
#define re
Definition: l1_czcs_hdf.c:701
===========================================================================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
Definition: HISTORY.txt:126
subroutine crossp(v1, v2, v3)
Definition: crossp.f:2
#define pi
Definition: vincenty.c:23
#define omf2
Definition: l1_czcs_hdf.c:703
#define f
Definition: l1_czcs_hdf.c:702
for(i=0;i< NROOTS;i++) s[i]
Definition: decode_rs.h:85