C$Procedure CHKSUC C SUBROUTINE CHKSUC ( STRAT , & CLASS , LIMITS , & BNDFUZ , TIMFUZ , TARGET , & SUCCES ) 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 18-JUL-1990 Eric Cannell creation of CHKSUC C C$ Purpose C C CHKSUC determines if the ground track quantified by LIMITS successfully C meets the targeting criteria defined by the selected strategy. C C The success criteria for the different strategies are: C C STRAT = 'LONG' --> the furthest west point of the ground track must be C within BDNFUZ of the west boundary, but not beyond. C The ground track classification must be 1. C C STRAT = 'EAST' --> the time at the end of the ground track must be within C TIMFUZ of the target time on the east boundary. The C ground track classification must be 1 or 2. C C STRAT = 'WEST' --> the time at the end of the ground track must be within C TIMFUZ of the target time on the west boundary. The C ground track classification must be 4 or 5. C C$ Input_Arguments C C Name Type Dim Units Description C ----------------------------------------------------------------------------- C STRAT C*6 1 - name of targeting strategy. See Purpose. C CLASS I 1 - classification of ground track as per C discussion in Purpose Section GTARG. C LIMITS DP 4,2 days,km with regard to ascending nodes, the C time (in days) and ground track offset C (in km) of the first node, the furthest C west node, the furthest east node, and C the last node of the ground track. LIMITS C allows GTARG to classify the ground track. C time offset C |------|--------| C first node | days | km | C furthest west node | days | km | C furthest east node | days | km | C final node | days | km | C |------|--------| C BNDFUZ DP 1 km when longitude targeting a ground track C to the west boundary, BNDFUZ is the C fuzziness of BOUNDS(1). In essence, if C ground is within BNDFUZ of BOUNDS(1), but C not beyond, then that is close enough. C TIMFUZ DP 1 days when time targeting a ground track C to the east or west boundary, TIMFUZ is C the fuzziness of TARGET. In essence, if C ground track is within TIMFUZ of the C target time, then that is close enough. C TARGET DP 1 --> boundary (in km) when STRAT='LONG' or C time (in days) when STRAT='EAST'/'WEST' C to which GTARG is trying to target the C ground track C C$ Output_Arguments C C Name Type Dim Units Description C ----------------------------------------------------------------------------- C SUCCES L 1 - true if ground track satisfies targeting C criteria C C$ Files C C File Name Unit Number Description C ----------------------------------------------------------------------------- C * * standardd I/O C OFILE 8 text output file C C$ Declarations_of_Input_and_Output_Arguments C DOUBLE PRECISION BNDFUZ INTEGER CLASS DOUBLE PRECISION LIMITS ( 4 , 2 ) CHARACTER*6 STRAT LOGICAL SUCCES DOUBLE PRECISION TARGET DOUBLE PRECISION TIMFUZ C C$ Declarations_of_Local_Variables C DOUBLE PRECISION DT C C$ Method C-& C1 Just assume success is false until proved otherwise. SUCCES = .FALSE. C1 Success is determined differently for different strategies. IF ( STRAT .EQ. 'LONG' ) THEN C2 If employing the longitudinal targeting strategy to the west C2 boundary, check to see if the furthest west point of the ground C2 track is within BNDFUZ of the target boundary, but not beyond. IF ( CLASS .EQ. 1 & .AND. TARGET .LE. LIMITS(2,2) & .AND. LIMITS(2,2) .LE. ( TARGET + BNDFUZ ) & ) & SUCCES = .TRUE. ELSE IF ( STRAT .EQ. 'EAST' ) THEN C2 If employing the time targeting to the east boundary, check to see C2 if the final point on the ground track arrives at the east boundary C2 at a time TIMFUZ within the TARGET time. DT = DABS( TARGET - LIMITS(4,1) ) IF ( ( CLASS .EQ. 1 & .OR. CLASS .EQ. 2 & ) & .AND. DT .LE. TIMFUZ & ) & SUCCES = .TRUE. ELSE IF ( STRAT .EQ. 'WEST' ) THEN C2 If employing the time targeting to the west boundary, check to see C2 if the final point on the ground track arrives at the west boundary C2 at a time TIMFUZ within the TARGET time. DT = DABS( TARGET - LIMITS(4,1) ) IF ( ( CLASS .EQ. 4 & .OR. CLASS .EQ. 5 & ) & .AND. DT .LE. TIMFUZ & ) & SUCCES = .TRUE. ELSE C2 Otherwise, STRAT has an invlaid value. WRITE(*,301) STRAT WRITE(8,301) STRAT 301 FORMAT(/,1X,'GTARG: in SUCCES, STRAT("',A6,'") is invalid.') STOP END IF C1 End of CHKSUC. RETURN END