OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
eartol.f
Go to the documentation of this file.
1  subroutine eartol(earth,navqc,earrng)
2 c
3 c eartol(earth,navqc,earrng)
4 c
5 c Purpose: Check earth sensor values to see that they are within
6 c the required tolerences
7 c
8 c Calling Arguments:
9 c
10 c Name Type I/O Description
11 c -------- ---- --- -----------
12 c earth struct I/O earth sensor data structure
13 c navqc struct I navigation quality control info
14 c earrng I*4 I size 2 (start-end) by 2 ( sens 1, 2 )
15 c array of active range for
16 c the 2 earth sensors
17 c
18 c By: W. Robinson, GSC, 13 Apr 93
19 c
20 c Notes:
21 c
22 c Modification History:
23 c
24  implicit none
25 #include "tlm_str.fin"
26 #include "navqc_s.fin"
27 c
28  type(earth_struct) :: earth(2)
29  type(navqc_struct) :: navqc
30 c
31  integer*4 earrng(2,2)
32 c
33  integer*4 isens, ilin
34 c
35 c
36 c flag any unflagged earth sensor data in active range with
37 c angles out of tolerence
38 c
39  do isens = 1,2
40  if( earrng(1,isens) .ne. -1 ) then
41 c
42  do ilin = earrng(1,isens), earrng(2,isens)
43  if( earth(isens)%flag(ilin) .eq. 0 ) then
44  if(( earth(isens)%widphse(1,ilin) .lt.
45  1 navqc%ear_tol_wd(1) ) .or.
46  1 ( earth(isens)%widphse(1,ilin) .gt.
47  1 navqc%ear_tol_wd(2) ) .or.
48  1 ( earth(isens)%widphse(2,ilin) .lt.
49  1 navqc%ear_tol_ph(1) ) .or.
50  1 ( earth(isens)%widphse(2,ilin) .gt.
51  1 navqc%ear_tol_ph(2) ) )
52  1 earth(isens)%flag(ilin) = 1
53  end if
54  end do
55 c
56  end if
57  end do
58 c
59 c and end
60 c
61  990 continue
62  return
63  end
subroutine eartol(earth, navqc, earrng)
Definition: eartol.f:2