C$Procedure CHKDV C SUBROUTINE CHKDV ( STRAT , CLASS , DV , VALUE , TARGET , DVBND ) C C C******************************************************************************* C C Copyright (C) 1993, California Institute of Technology. U.S. C Government Sponsorhip under NASA Contract NAS7-918 is C acknowledged. C C******************************************************************************* C C$ Log C C Date Name Description C ----------------------------------------------------------------------------- C 30-JUL-1990 Eric Cannell creation of CHKDV C C$ Purpose C C CHKDV determines if the current dV and ground track can be used to C restrict the range of dV's that bound the target dV. C C The TARGET is the desired value of the criteria variable. What the criteria C variable represents depends on the strategy defined by STRAT: C C STRAT | criteria contents | units C -------|-----------------------------------------------|------ C 'LONG' | furthest west limit of ground tracks | km C 'EAST' | time for ground tracks to reach east boundary | days C 'WEST' | time for ground tracks to reach west boundary | days C C Depending on the type of ground track (CLASS), the dV (DV), and where C the ground track lies with respect to the desired ground track (VALUE, C TARGET), CHKDV may restrict the dV's that bound the desired targeted C dV. C C$ Input_Arguments C C Name Type Dim Units Description C ----------------------------------------------------------------------------- C STRAT C*6 1 - see Purpose C CLASS I 1 - type of last ground track C DV DP 1 mm/sec dV of last ground track C VALUE DP 1 --> current value of criteria variable. See C Purpose. C TARGET DP 1 --> see Purpose C DVBND DP 2 mm/sec smallest range of dV's known to bound C the target dV: C DVBND(1) = largest dV < target dV C DVBND(2) = smallest dV > target dV C C$ Output_Arguments C C Name Type Dim Units Description C ----------------------------------------------------------------------------- C DVBND DP 2 mm/sec smallest range of dV's known to bound C the target dV: C DVBND(1) = largest dV < target dV C DVBND(2) = smallest dV > target dV C C$ References C C 1] See GTARG.FOR for a discussion regarding the classification of C ground tracks. C C$ Restrictions C C 1] CLASS should only have values in the range of 1..6. C C 3] CHKDV should not be called with STRAT = 'RUNOUT'. CHKDV is only for C targeting a ground track, not running one out. C C$ Declarations_of_Input_and_Output_Arguments C INTEGER CLASS DOUBLE PRECISION DV DOUBLE PRECISION DVBND ( 2 ) CHARACTER*6 STRAT DOUBLE PRECISION TARGET DOUBLE PRECISION VALUE C C$ Method C-& C1 Action depends on the type of strategy... IF ( STRAT .EQ. 'LONG' ) THEN C2 If using the longitudinal targeting strategy... IF ( CLASS .LE. 3 .AND. DV .GT. DVBND(1) ) THEN C3 If CLASS is 1, 2, or 3 and dV is > low dV bound, then C3 increase low dV bound. DVBND(1) = DV ELSE IF ( CLASS .GE. 4 .AND. DV .LT. DVBND(2) ) THEN C3 If CLASS is 4, 5, or 6 and dV is < high dV bound, then C3 decrease high dV bound. DVBND(2) = DV END IF ELSE IF ( STRAT .EQ. 'EAST' ) THEN C2 If using the time targeting strategy to east boundary... IF ( ( CLASS .EQ. 1 & .OR. CLASS .EQ. 2 & ) & .AND. VALUE .LT. TARGET & .AND. DV .GT. DVBND(1) ) THEN C3 If CLASS is 1 or 2, the current VALUE < the target value, and C3 the current dV > than the current low dV bound, then set the C3 low dV bound to the current dV. DVBND(1) = DV ELSE IF ( ( CLASS .EQ. 1 & .OR. CLASS .EQ. 2 & ) & .AND. VALUE .GT. TARGET & .AND. DV .LT. DVBND(2) ) THEN C3 If CLASS is 1 or 2, the current VALUE < the target value, and C3 the current dV < than the current high dV bound, then set the C3 high dV bound to the current dV. DVBND(2) = DV ELSE IF ( ( CLASS .EQ. 3 & ) & .AND. DV .GT. DVBND(1) ) THEN C3 If CLASS is 3 and the current dV > than the current low dV bound, C3 then set the low dV bound to the current dV. DVBND(1) = DV ELSE IF ( ( CLASS .GE. 4 & ) & .AND. DV .LT. DVBND(2) ) THEN C3 If CLASS is >= 4 and the current dV < than the current high dV C3 bound, then set the high dV bound to the current dV. DVBND(2) = DV END IF ELSE IF ( STRAT .EQ. 'WEST' ) THEN C2 If using the time targeting strategy to west boundary... IF ( ( CLASS .LE. 3 & ) & .AND. DV .GT. DVBND(1) ) THEN C3 If CLASS is <= 3 and the current dV > than the current low dV C3 bound, then set the low dV bound to the current dV. DVBND(1) = DV ELSE IF ( ( CLASS .EQ. 4 & .OR. CLASS .EQ. 5 & ) & .AND. VALUE .GT. TARGET & .AND. DV .GT. DVBND(1) ) THEN C3 If CLASS is 4 or 5, the current VALUE > the target value, and C3 the current dV > than the current low dV bound, then set the C3 low dV bound to the current dV. DVBND(1) = DV ELSE IF ( ( CLASS .EQ. 4 & .OR. CLASS .EQ. 5 & ) & .AND. VALUE .LT. TARGET & .AND. DV .LT. DVBND(2) ) THEN C3 If CLASS is 4 or 5, the current VALUE < the target value, and C3 the current dV < than the current high dV bound, then set the C3 high dV bound to the current dV. DVBND(2) = DV ELSE IF ( ( CLASS .EQ. 6 & ) & .AND. DV .LT. DVBND(2) ) THEN C3 If CLASS is 6 and the current dV < than the current high dV bound, C3 then set the high dV bound to the current dV. DVBND(2) = DV END IF END IF C1 End of CHKDV. RETURN END