OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
ellxfm.f
Go to the documentation of this file.
1  subroutine ellxfm(attxfm, att_ang, tilt, p, navctl, smat, coef)
2 c
3 c ellxfm(attxfm, att_ang, tilt, p, navctl, smat, coef)
4 c
5 c purpose: get sensor orientation matrix and scan ellipse
6 c coefficients for navigation of seawifs data
7 c
8 c calling arguments:
9 c
10 c name Type i/o description
11 c -------- ---- --- -----------
12 c attxfm r*4 i size 3 by 3 attitude transform matrix
13 c att_ang r*4 i size 3 spacecraft yaw, roll and pitch
14 c tilt r*4 i tilt angle
15 c p r*4 i size 3 spacecraft position from gps
16 c navctl struct i controls for processing data
17 c smat(3,3) r*4 o sensor orientation matrix
18 c coef(6) r*4 o scan path coefficients
19 c
20 c by: w. robinson, gsc, 29 mar 93
21 c
22 c notes: this is taken from the orient routine by f patt. the
23 c attitude transform matrix replaces the computation of
24 c the same made from the position and velocity(this is done
25 c elsewhere). what follows is the description of orient
26 c
27 c this subroutine performs a simple calculation of the sensor
28 c orientation from the orbit position vector and input values of the
29 c attitude offset angles. the calculations assume that the angles
30 c represent the yaw, roll and pitch offsets between the local vertical
31 c reference frame(at the spacecraft position) and the sensor frame.
32 c sensor tilt angles are assumed to be included in the pitch angle.
33 c the outputs are the matrix which represents the transformation from
34 c the geocentric rotating to sensor frame, and the coefficients which
35 c represent the earth scan track in the sensor frame.
36 c
37 c the reference ellipsoid uses an equatorial radius of 6378.137 km and
38 c a flattening factor of 1/298.257 (wgs 1984).
39 c
40 c modification history:
41 c
42 c added sensor offset matrix navctl.msenoff to calculation of sensor
43 c transformation matrix - f. s. patt, march 11, 1994.
44 c
45 c subprograms called:
46 c
47 c crossp compute cross product of two vectors
48 c euler compute matrix from euler angles
49 c matmpy multiply two 3x3 matrices
50 c
51  implicit none
52 #include "nav_cnst.fin"
53 #include "navctl_s.fin"
54  type(navctl_struct) :: navctl
55 
56  real att_ang(3), attxfm(3,3)
57  real smat(3,3),coef(6), p(3)
58 c
59  real*8 rd
60  real*4 sm1(3,3), sm2(3,3), sm3(3,3), tilt
61  integer*4 i, j
62 
63  rd = 1.d0/omf2
64 
65 c convert euler angles to matrix
66  call euler(att_ang,sm1)
67 
68 c apply attitude offset matrix
69  call matmpy(sm1,attxfm,sm2)
70 
71 c apply sensor offset matrix
72  call matmpy(navctl%msenoff,sm2,sm1)
73 
74 c compute rotation matrix for tilt angle and apply
75  call eaxis(navctl%tiltcos,tilt,sm2)
76  call matmpy(sm2,sm1,sm3)
77 
78 c compute coefficients of intersection ellipse in scan plane
79  coef(1) = 1.d0+(rd-1.d0)*sm3(1,3)*sm3(1,3)
80  coef(2) = (rd-1.d0)*sm3(1,3)*sm3(3,3)*2.d0
81  coef(3) = 1.d0+(rd-1.d0)*sm3(3,3)*sm3(3,3)
82  coef(4) = (sm3(1,1)*p(1)+sm3(1,2)*p(2)+sm3(1,3)*p(3)*rd)*2.d0
83  coef(5) = (sm3(3,1)*p(1)+sm3(3,2)*p(2)+sm3(3,3)*p(3)*rd)*2.d0
84  coef(6) = p(1)*p(1)+p(2)*p(2)+p(3)*p(3)*rd-re*re
85 
86 c transfer sensor orientation matrix to output array
87  do i=1,3
88  do j=1,3
89  smat(i,j) = sm3(i,j)
90  end do
91  end do
92 
93  return
94  end
int navigation(int32_t fileID)
Definition: l1_octs_hdf.c:696
float * vector(long nl, long nh)
Definition: nrutil.c:15
#define flattening
Definition: vincenty.c:24
subroutine earth(pos, vel, widphse1, widphfl1, widphse2,
Definition: earth.f:2
subroutine eaxis(e, phi, xm)
Definition: eaxis.f:2
float ** matrix(long nrl, long nrh, long ncl, long nch)
Definition: nrutil.c:60
#define real
Definition: DbAlgOcean.cpp:26
float rd(float x, float y, float z)
#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
subroutine ellxfm(attxfm, att_ang, tilt, p, navctl, smat, coef)
Definition: ellxfm.f:2
subroutine euler(a, xm)
Definition: euler.f:2
#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
void radius(double A)
Definition: proj_report.c:132
subroutine matmpy(xm1, xm2, xm3)
Definition: ocorient.f:197