OB.DAAC Logo
NASA Logo
Ocean Color Science Software

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