C$Procedure FNDDV C SUBROUTINE FNDDV ( STRAT , & CLSOLD , CLSNOW , & DVOLD , DVNOW , DVBND , & VALOLD , VALNOW , TARGET & ) 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 FNDDV C C$ Purpose C C FNDDV determines the next dV to execute given the selected targeting C strategy, the old and current ground track classes, the old and current C dV's, the old and current success criteria variables, and the target C itself. C C The old criteria variable is the second to last value of the criteria C variable. The current criteria variable is the last value of the criteria C variable. The TARGET is the desired value of the criteria variable. What C the criteria 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 Note that VALOLD and VALNOW may or may not be used to compute the C next dV: it all depends on the strategy and CLSOLD and CLSNOW. C C FNDDV also ensures convergence by forcing the next dV to be within C the range defined by DVBND. If not, FNDDV replaces the dV with the C midpoint of the DVBND range. C C Finally, FNDDV is used for targeting a ground track. GTARG should not C be calling FNDDV when STRAT = 'RUNOUT'. C C$ Input_Arguments C C Name Type Dim Units Description C ----------------------------------------------------------------------------- C STRAT C*6 1 - see Purpose C CLSOLD I 1 - type of next to last ground track C CLSNOW I 1 - type of last ground track C DVOLD DP 1 mm/sec dV of next to last ground track C DVNOW DP 1 mm/sec dV of last ground track 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 VALOLD DP 1 --> see Purpose C VALNOW DP 1 --> see Purpose C TARGET DP 1 --> see Purpose C C$ Output_Arguments C C Name Type Dim Units Description C ----------------------------------------------------------------------------- C DVOLD DP 1 mm/sec dV of last ground track (input DVNOW) C DVNOW DP 1 mm/sec dV of next ground track 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] CLSOLD and CLSNOW can only have values in the range of 1..6 and C combinations defined in the Method Section of called routines. C C 2] FNDDV assumes that a positive dV is along the velocity vector and C raises the semi-major axis. Conversely, a negative dV is opposite C the velocity vector and lowers semi-major axis. C C 3] FNDDV cannot be called with STRAT = 'RUNOUT'. FNDDV is only for C targeting a ground track, not running one out. C C$ Library_Links C C Entry Point Name Location C ----------------------------------------------------------------------------- C DVEAST GTARG C DVLONG GTARG C DVWEST GTARG 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 INTEGER CLSNOW INTEGER CLSOLD DOUBLE PRECISION DVBND ( 2 ) DOUBLE PRECISION DVNOW DOUBLE PRECISION DVOLD CHARACTER*6 STRAT DOUBLE PRECISION TARGET DOUBLE PRECISION VALNOW DOUBLE PRECISION VALOLD C C$ Method C-& C write(8,*) 'FNDDV(START): STRAT=', STRAT , C & ' CLSOLD=' , CLSOLD , C & ' CLSNOW=' , CLSNOW , C & ' DVOLD=' ,DVOLD , ' DVNOW=' , DVNOW , C & ' DVBND=' ,DVBND , ' VALOLD=' , VALOLD , C & ' VALNOW=' ,VALNOW , ' TARGET= ',TARGET C1 Compute the new dV as per STRAT. IF ( STRAT .EQ. 'LONG' ) THEN CALL DVLONG ( CLSOLD , CLSNOW , & DVOLD , DVNOW , & VALOLD , VALNOW , TARGET & ) ELSE IF ( STRAT .EQ. 'EAST' ) THEN CALL DVEAST ( CLSOLD , CLSNOW , & DVOLD , DVNOW , & VALOLD , VALNOW , TARGET & ) ELSE IF ( STRAT .EQ. 'WEST' ) THEN CALL DVWEST ( CLSOLD , CLSNOW , & DVOLD , DVNOW , & VALOLD , VALNOW , TARGET & ) ELSE WRITE(*,301) STRAT WRITE(8,301) STRAT 301 FORMAT(/,1X,'GTARG: in FNDDV, STRAT("',A6,'") is invalid.') STOP END IF C1 Check that computed dV is within the know range of dV's bounding C1 target dV. If not, set next dV to midpoint of known range, i.e., C1 bisect the known dV bounds. IF ( DVNOW .LE. DVBND(1) .OR. DVBND(2) .LE. DVNOW ) & DVNOW = ( DVBND(1) + DVBND(2) ) / 2D0 C1 End of FNDDV. C write(8,*) 'FNDDV(END): STRAT=', STRAT , C & ' CLSOLD=' , CLSOLD , C & ' CLSNOW=' , CLSNOW , C & ' DVOLD=' ,DVOLD , ' DVNOW=' , DVNOW , C & ' DVBND=' ,DVBND , ' VALOLD=' , VALOLD , C & ' VALNOW=' ,VALNOW , ' TARGET= ',TARGET RETURN END