C$Procedure FNDCLS C SUBROUTINE FNDCLS ( LIMITS , BOUNDS , CLASS ) 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 FNDCLS C C$ Purpose C C FNDCLS classifies a ground track according to the following sample C ground track charts: C C CLASS = 1 CLASS = 4 C C | ....| |.. | C | .. | | ... | C | . | | .. | C | . | | . | C | .. | | .. | C | ..| | .. | C |------------. |--.---------| C C CLASS = 2 CLASS = 5 C C | | | | C | | | | C | ...| |. | C | ..... | | ... | C | .. | | ... | C |.. | | ... | C |.-----------| |---------.--| C C CLASS = 3 CLASS = 6 C C | | . | | C | | .. .. | | C | | .. . | | C | | .. . | | C | |.. .. | | C | |. ..| | C |------------. .|------------| C C FNDCLS uses the furthest west and east point of a ground track, as well C as the west and east boundary, in order to classify the ground track. C As it turns out, the times in LIMITS are not required in order to C complete the classification. C C Note that the above ground track patterns do not have to begin within C the valid band. Except for CLASS 3 and 6, however, all other classes C do stop at the east or west boundary of the valid band. C C$ Input_Arguments C C Name Type Dim Units Description C ----------------------------------------------------------------------------- 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 BOUNDS DP 2 km the low and high boundaries (in that order) C of the valid ground track band as measured C from the reference ground track. Usually, C BOUNDS will be something like -/+ 1 km. C But, BOUNDS could be (.5,1.5), i.e., fully C right of the reference ground track. C C$ Output_Arguments C C Name Type Dim Units Description C ----------------------------------------------------------------------------- C CLASS I 1 - classification of ground track as per C discussion in Purpose Section. C C$ Files C C File Name Unit Number Description C ----------------------------------------------------------------------------- C * * standard I/O C OFILE 8 text output file C C$ Declarations_of_Input_and_Output_Arguments C DOUBLE PRECISION BOUNDS ( 2 ) INTEGER CLASS DOUBLE PRECISION LIMITS ( 4 , 2 ) C C$ Declarations_of_Local_Variables C DOUBLE PRECISION END DOUBLE PRECISION ESTBND DOUBLE PRECISION FAREST DOUBLE PRECISION FARWST DOUBLE PRECISION START DOUBLE PRECISION WSTBND C C$ Method C-& C1 For clarity, transfer needed LIMITS and BOUNDS into local, simple C1 variables. START = LIMITS(1,2) FARWST = LIMITS(2,2) FAREST = LIMITS(3,2) END = LIMITS(4,2) WSTBND = BOUNDS(1) ESTBND = BOUNDS(2) C1 Summary of classifcation rules (check in specified order!): C1 C1 1] if furthest west >= east boundary --> CLASS = 3 C1 C1 2] if furthest east <= west boundary --> CLASS = 6 C1 C1 3] if furthest west < first node C1 AND furthest west < last node --> CLASS = 1 C1 C1 4] if furthest east > first node C1 AND furthest east > last node --> CLASS = 4 C1 C1 5] if furthest east = first node --> CLASS = 5 C1 C1 6] if furthest west = first node --> CLASS = 2 IF ( FARWST .GE. ESTBND ) THEN CLASS = 3 ELSE IF ( FAREST .LE. WSTBND ) THEN CLASS = 6 ELSE IF ( FARWST .LT. START .AND. FARWST .LT. END ) THEN CLASS = 1 ELSE IF ( FAREST .GT. START .AND. FAREST .GT. END ) THEN CLASS = 4 ELSE IF ( FAREST .EQ. START ) THEN CLASS = 5 ELSE IF ( FARWST .EQ. START ) THEN CLASS = 2 ELSE WRITE(*,301) BOUNDS , START , FARWST , FAREST , END WRITE(8,301) BOUNDS , START , FARWST , FAREST , END 301 FORMAT(/,1X,'GTARG: FNDCLS failed to classify ground track:', & //,1X,' boundaries = ',2F20.10, & /,1X,' first node''s offset = ',F20.10, & /,1X,' far west node''s offset = ',F20.10, & /,1X,' far east node''s offset = ',F20.10, & /,1X,' final node''s offset = ',F20.10) STOP END IF C1 End of FNDCLS. RETURN END