OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
conv_tilt.f
Go to the documentation of this file.
1  subroutine conv_tilt(ang_fm,ang_mm,tilt)
2 
3 c $Header$
4 c $Log$
5 c
6 c
7 c conv_tilt(ang_fm,ang_mm,tilt)
8 c
9 c Purpose: Convert tilt motor telemetry angles to instrument tilt
10 c
11 c Calling Arguments:
12 c
13 c Name Type I/O Description
14 c -------- ---- --- -----------
15 c ang_fm R*4 I Fixed motor angle
16 c ang_mm R*4 I Moving motor angle
17 c tilt R*4 I Instrument Tilt angle
18 c
19 c By: Frederick S. Patt, GSC, 25 April 1996
20 c
21 c Notes:
22 c
23 c Algorithm described in "SeaWiFS Tilt Telemetry Analysis", F. Patt,
24 c informal memorandum, July 21, 1994
25 c
26 c Modification History:
27 c
28 c Adjusted tilt telemetry angle calibrations to force agreement between
29 c tilt angles computed from telemetry and static values from SBRS.
30 c F. S. Patt, GSC, November 10, 1997
31 
32  implicit none
33  real*4 ang_fm,ang_mm,tilt
34  real*4 alen,blen,rlen,llen
35  real*4 fscal,foff,fref,mscal,moff,mref,toff
36  real*4 loc_f,loc_m,apri,bpri,tpri,dtf,dtm
37  real*8 pi,radeg,re,rem,f,omf2,omegae
38  common /gconst/pi,radeg,re,rem,f,omf2,omegae
39 
40 c The values below are given in the referenced memorandum
41 c Dimensions for tilt components
42  data alen/7.088/, blen/6.000/, rlen/1.025/, llen/4.070/
43 
44 c Reference angles for telemetry measurements and tilt angle
45  data mref/235.0/, fref/80.0/, toff/-35.068/
46 
47 c These are the corrections for the tilt motor angles from the
48 c nominal conversions provided by SBRC
49  data fscal/1.0/, foff/-1.5/, mscal/.964/, moff/0.0/
50 
51 
52 c Apply corrections to motor angles
53  loc_f = fscal*ang_fm + foff
54  loc_m = mscal*ang_mm + moff
55 
56 c Convert tilt as described in memo
57 
58 c Compute pivot to link distances (equations 1 and 2)
59  apri = sqrt(alen**2 + rlen**2 -
60  * 2.0*alen*rlen*cos((loc_f+fref)/radeg))
61  bpri = sqrt(blen**2 + rlen**2 -
62  * 2.0*blen*rlen*cos((loc_m+mref)/radeg))
63 
64 c Compute angle theta-prime (equation 3)
65  tpri = acos((apri**2 + bpri**2 - llen**2)/(2.0*apri*bpri))
66 
67 c Compute corrections to theta-prime for fixed and moving motors
68 c (equations 4 and 5)
69  dtf = asin(rlen*sin((loc_f+fref)/radeg)/apri)
70  dtm = asin(rlen*sin((loc_m+mref)/radeg)/bpri)
71 
72 c Compute tilt angle (equations 6 and 7)
73  tilt = (tpri - dtf - dtm)*radeg + toff
74 
75  return
76  end
#define real
Definition: DbAlgOcean.cpp:26
#define re
Definition: l1_czcs_hdf.c:701
#define pi
Definition: vincenty.c:23
#define omf2
Definition: l1_czcs_hdf.c:703
#define f
Definition: l1_czcs_hdf.c:702
subroutine conv_tilt(ang_fm, ang_mm, tilt)
Definition: conv_tilt.f:2