OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
get_xfm.f
Go to the documentation of this file.
1  subroutine get_xfm( smat, navctl, tilt, att, attxfm)
2 c
3 c get_xfm( smat, msenoff, tilt, att, attxfm)
4 c
5 c Purpose: extract the ECEF-to-orbital transformation matrix from the
6 c sensor transformation matrix.
7 c
8 c Calling Arguments:
9 c
10 c Name Type I/O Description
11 c -------- ---- --- -----------
12 c smat(3,3) R*4 I size 3 by 3 sensor transformation matrix
13 c navctl struct I navigation control parameter structure
14 c tilt R*4 I tilt angle
15 c att(3) R*4 I size 3 array of attitude angles
16 c attxfm(3,3) R*4 O size 3 by 3 ECEF-to-orbital frame matrix
17 c
18 c By: F. S. Patt, SAIC GSC, 24 Sep 98
19 c
20 c Notes: This routine essentially performs the reverse of the matrix
21 c operations used by ellxfm, in order to obtain the ECEF-to-orbital
22 c transformation.
23 c
24 c Modification History:
25 c
26  implicit none
27 c
28 #include "navctl_s.fin"
29 c
30  type(navctl_struct) :: navctl
31  real*4 smat(3,3), att(3), attxfm(3,3), tilt
32  real*4 sm1(3,3), sm2(3,3), sm3(3,3)
33 
34 c Compute rotation matrix for tilt angle, transpose and apply
35  call eaxis( navctl%tiltcos, tilt, sm1)
36  call xpose( sm1, sm2)
37 
38  call matmpy( sm2, smat, sm3)
39 
40 c Apply transpose of sensor offset matrix
41  call xpose( navctl%msenoff, sm1)
42  call matmpy( sm1, sm3, sm2)
43 
44 c Convert Euler angles to matrix
45  call euler(att,sm3)
46  call xpose( sm3, sm1)
47 
48 c Apply attitude offset matrix
49  call matmpy( sm1, sm2, attxfm)
50 
51  return
52  end
subroutine eaxis(e, phi, xm)
Definition: eaxis.f:2
#define real
Definition: DbAlgOcean.cpp:26
subroutine get_xfm(smat, navctl, tilt, att, attxfm)
Definition: get_xfm.f:2
subroutine xpose(in, out)
Definition: xpose.f:2
subroutine euler(a, xm)
Definition: euler.f:2
subroutine matmpy(xm1, xm2, xm3)
Definition: ocorient.f:197