1 subroutine sc_att(gaclac,tlm,navqc,att_ang,attangfl,
31 #include "tlm_str.fin"
32 #include "navqc_s.fin"
33 type(tlm_struct) :: tlm
36 integer*4 gaclac, iret, attangfl(maxlin)
37 real*4 att_ang(3,maxlin)
41 integer*4 i1, i2, nper, ilin, nlines, i
51 if( gaclac .eq. 1 )
then
56 nlines = nper * tlm%ntlm
62 if( tlm%sc_att%flag(ilin) .eq. 0 )
then
63 if( ( tlm%sc_att%att(1,ilin) .lt. navqc%sc_att(1,1) ) .or.
64 1 ( tlm%sc_att%att(1,ilin) .gt. navqc%sc_att(2,1) ) .or.
65 1 ( tlm%sc_att%att(2,ilin) .lt. navqc%sc_att(1,2) ) .or.
66 1 ( tlm%sc_att%att(2,ilin) .gt. navqc%sc_att(2,2) ) .or.
67 1 ( tlm%sc_att%att(3,ilin) .lt. navqc%sc_att(1,3) ) .or.
68 1 ( tlm%sc_att%att(3,ilin) .gt. navqc%sc_att(2,3) ) )
69 1 tlm%sc_att%flag(ilin) = 1
81 call fndflg(tlm%sc_att%flag, tlm%ntlm, 1, i1 )
88 100
format(
' SC_ATT: no unflagged S/C based attitude values found')
95 call fndflg(tlm%sc_att%flag, tlm%ntlm, (i1 + 1), i2 )
104 diff(i) = tlm%sc_att%att(i,i2) - tlm%sc_att%att(i,i1)
105 toldif(i) = navqc%att_del(i) * ( i2 - i1 ) *
109 if( (
diff(1) .gt. toldif(1) ) .or.
110 1 (
diff(2) .gt. toldif(2) ) .or.
111 1 (
diff(3) .gt. toldif(3) ) )
then
112 tlm%sc_att%flag(i1) = 1
113 tlm%sc_att%flag(i2) = 1
123 if( .not. found )
then
126 500
format(
' SC_ATT: no consistent pairs of S/C based attitude were
133 call fitrng(tlm%sc_att%att, tlm%ntlm, 3, tlm%sc_att%flag,
134 1 nper, att_ang, attangfl)